Quantum computing on lattices using global two-qubit gates