Natural materials typically interact weakly with the magnetic component of light which greatly limits their applications. This has led to the development of artificial metamaterials and metasurfaces. However, natural atoms, where only electric dipole transitions are relevant at optical frequencies, can cooperatively respond to light to form collective excitations with strong magnetic, as well as electric, interactions, together with corresponding electric and magnetic mirror reflection properties. By combining the electric and magnetic collective degrees of freedom we show that ultrathin planar arrays of atoms can be utilized as atomic lenses to focus light to subwavelength spots at the diffraction limit, to steer light at different angles allowing for optical sorting, and as converters between different angular momentum states. The method is based on coherently superposing induced electric and magnetic dipoles to engineer a quantum nanophotonic Huygens' surface of atoms, giving full 2𝜋 phase control over the transmission, with close to zero reflection.