Relationship between the statistical mechanics partition function and the path integral correlation function

In the path integral formulation I have $Z[J]$, the generating functional of correlation functions, and $W[J]=\frac{i}{\hbar} \ln{Z[J]}$, the generating functional of connected correlation functions. These two (which would be generating functionals of moments and cumulants in probability) give information about the relative distribution.

Now, in statistical mechanics, when considering a canonical ensemble, I have the partition function $Z= \sum_i \exp (-\beta E_i)$ and the Helmholtz free energy $F=-kT \ln{Z}$, from which I can derive all the thermodynamical quantities (S, P, $\mu$...).

Can I view the partition function as being something like the generating functional of correlation functions, and the Helmholtz free energy as being the generating functional of connected correlation functions? The latter would kinda make sense to me, as from $F$ I can obtain physical quantities.

And if this is so, is there a more vast and general subject involving other statistical mechanics quantities?