Refracting or diffracting devices, e.g. lens, prism comprising three-dimensional array of impedance discontinuities, e.g. holes in conductive surfaces or conductive discs forming artificial dielectric