Is there a way to correlate groups of variables?

Suppose I have two binary variables, $X_1,X_2\in \lbrace 0,1\rbrace$. I can compute Pearson's correlation between them

$$\text{Corr}(X_1,X_2) = \frac{\text{Cov}(X_1,X_2)}{\sigma_{X_1}\sigma_{X_2}}$$

Now, I have been exploring association rule learning. In this type of machine learning, I am able to pick out rules like $\lbrace \text{onion,bun} \rbrace\Rightarrow \lbrace \text{hamburger}\rbrace$.

So when I look at these two different mechanisms, I see the following:

If I have a strong, postivie Pearson correlation between two variables, then if $X_1 = 1$, it is also likely that $X_2 = 1$.

If a customer has purchased onions and buns, it is likely they will buy a hamburger patty too (which is binary, 1 for purchase, 0 for no purchase).

So both of these things allow me to make inferences about binary variables. But unlike Pearson correlation, association rule learning allows me to use multiple inputs.

MY QUESTION

Is there a version of correlation that accomplishes something similar to Pearson correlation but for groups of variables?