Dipole mode analysis of arrays of dielectric and pasmonic particle metamaterials