We study how the radiative properties of a dense ensemble of atoms can be modified when they are placed near or between metallic or dielectric surfaces. If the average separation between the atoms is comparable or smaller than the wavelength of the scattered photons, the coupling to the radiation field induces long-range coherent interactions based on the interatomic exchange of virtual photons. Moreover, the incoherent scattering of photons back to the electromagnetic field is known to be a many-body process, characterized by the appearance of superradiant and subradiant emission modes. By changing the radiation field properties, in this case by considering a layered medium where the atoms are near metallic or dielectric surfaces, these scattering properties can be dramatically modified. We perform a detailed study of these effects, with focus on experimentally relevant parameter regimes. We finish with a specific application in the context of quantum information storage, where the presence of a nearby surface is shown to increase the storage time of an atomic excitation that is transported across a one-dimensional chain.