Unidirectional absorption, storage, and emission of single photons in a collectively responding bilayer atomic array