Investigating the functional consequences of heterogeneity within immune cell populations