For three elements $1$, $2$ and $3$, I have the following formula:
$$Var(X_{1,2}) + Var(X_{1,3}) + Var(X_{2,3}) + 2Cov(X_{1,2},X_{1,3}) +2Cov(X_{1,2},X_{2,3}) + 2Cov(X_{1,3},X_{2,3})$$
I am looking for a general form of this formula for $m$ elements.
$$\mathrm{Var}\left(\sum_{i=1}^{n}X_i\right)=\sum_{i=1}^{n}\sum_{j=1}^{n}\mathrm{Cov}(X_i, X_j)$$ and recall that $\mathrm{Cov}(X_i, X_i) = \mathrm{Var}(X_i)$. The multiplication by $2$ is handled already as well, since $\mathrm{Cov}(X_i, X_j) = \mathrm{Cov}(X_j, X_i)$.