  Virtually all the emergent properties of a complex system are rooted in the
non-homogeneous nature of the behaviours of its elements and of the
interactions among them. However, the fact that heterogeneity and correlations
can appear simultaneously at local, mesoscopic, and global scales, is a
concrete challenge for any systematic approach to quantify them in systems of
different types. We develop here a scalable and non-parametric framework to
characterise the presence of heterogeneity and correlations in a complex
system, based on the statistics of random walks over the underlying network of
interactions among its units. In particular, we focus on normalised mean first
passage times between meaningful pre-assigned classes of nodes, and we showcase
a variety of their potential applications. We found that the proposed framework
is able to characterise polarisation in voting systems, including the UK Brexit
referendum and the roll-call votes in the US Congress. Moreover, the
distributions of class mean first passage times can help identifying the key
players responsible for the spread of a disease in a social system, and
comparing the spatial segregation of US cities, revealing the central role of
urban mobility in shaping the incidence of socio-economic inequalities.
