Can we assume a form of heteroskedasticity and correlation within groups with the sample mean? Correlation between errors and hetereoskadacity typically come up with regression, but can these same concepts come into play with the sample mean? I know hetereoskadacity itself does not make sense since it is about conditional variances, but I could think of each X$_i$ having its own variance, and that within sum subgroups, the X$_i$'s are correlated. so for example, say I have a geographic group g, so I can label my X's as X$_{i,g}$, and I assume Var(X$_{i,g}$) = $\sigma_i^2$, and for each observation within a given group g, cov(x$_{i,g}$, X$_{j,g}$) $\neq$ 0?
In which case, the variance of X$_i$ would become (for simplicity, assume g and g' are the only reasons, with two observations in each just because I can't think of the concise way to write this as a summation)
$\sigma_{1,g}^2$ + $\sigma_{2,g}^2$ + cov(x$_{1,g}$,x$_{j,g}$)  + $\sigma_{1,g'}^2$ + $\sigma_{2,g'}^2$ + cov(x$_{1,g'}$,x$_{j,g'}$).
Does this logic even make sense, theoretically and practically? For regression it is obvious that it is, but is there a real life application where this is the case, and how does this influence on sample t tests, confidence intervals for the sample mean etc. Is it something that can conceivable occur with a non 'simple random sample' for example for stratified samples?

Estimation of the sample mean is equivalent to estimating the coefficient of an intercept-only model. Consequently, if you have violations of the usual $iid$ assumption when you calculate the sample mean, I see no reason not to apply standard tricks like Newey-West corrections. Your estimation, after all, is just another regression.
