Although the quality of individual quantum bits (qubits) and quantum gates has been steadily improving, the number of qubits in a single system has increased quite slowly. Here, we demonstrate arbitrary single-qubit gates based on targeted phase shifts, an approach that can be applied to atom, ion, or other atom-like systems. These gates are highly insensitive to addressing beam imperfections and have little cross-talk, allowing for a dramatic scaling up of qubit number. We have performed gates in series on 48 individually targeted sites in a 40% full 5 by 5 by 5 three-dimensional array created by an optical lattice. Using randomized benchmarking, we demonstrate an average gate fidelity of 0.9962(16), with an average cross-talk fidelity of 0.9979(2) (numbers in parentheses indicate the one standard deviation uncertainty in the final digits).