Harmonic analysis of large systems. I. Methodology