Imaging single atoms in a three-dimensional array