A complete view of galaxy evolution: panchromatic luminosity functions and the generation of metals