Analysis of electromagnetic scattering from doubly periodic arrays of penetrable bodies using a patch-dipole current model