Unbundling macroeconomics via heterogeneous agents and input-output networks