Metallic nanoparticles arranged in arrays have been shown to support both localized surface plasmons (LSPs) and diffractive grating behavior, related to the inter-particle period. By selecting both the period and particle size, it is possible to generate lattice modes that are caused by interference of the LSP and the grating Rayleigh anomaly. These hybrid modes show a Fano-like lineshape with reduced linewidth relative to the LSP mode. In this paper, we study the lattice modes supported by gold and aluminum nanoparticle arrays in the visible and UV, both experimentally and theoretically. The measured and simulated dispersion curves allow us to comprehensively analyze the details of the LSP coupling in the array. We show that when the spectral position of the Rayleigh anomaly, dependent on the period of the array, is slightly blue-shifted with respect to the LSP resonance, the quality factor of the lattice mode is significantly increased. We also provide evidence that the formation of the lattice modes critically depends on the incident light polarization, with maximum coupling efficiency between LSPs and the in-plane scattered light when the polarization direction is perpendicular to the propagation direction of the grazing wave. The results obtained provide design rules for high quality factor resonances throughout the visible and ultraviolet spectral ranges.