How to generate random variables which are correlated and yet marginally identically distributed? I am wondering if there is a process to which we can generate random variables where there is a correlation structure between them, yet they are still marginally identically distributed? One idea that comes to mind is to work with perhaps random variables which are generated according to a stable law distribution. However, I am not sure how to modulate the correlation. Any ideas would be greatly appreciated. 
 A: This question is very broad, the class of random vectors you describe is very large, and there is no reason to expect one unified simulation algorithm for all of them. So the best we can do is giving examples.


*

*Some multivariate normal vectors, it is enough to require that the mean vector is constant $\mu \mathbf{1}_n$ and the covariance matrix is constant along the diagonal $\text{diag}(\Sigma) = \sigma^2 \mathbf{1}_n$. Then see Generating values from a multivariate Gaussian distribution.  Similar ideas for any elliptically-contoured distribution. 

*Stationary time series model will do.  For a short series the idea from 1. can be used, where the covariance matrix is a toeplitz matrix. General ARMA covariance matrix could be done as well.
Else, for instance Simulating state space model with AR(1) dynamics

*Any exchangeable vector can be used. A very simple example is the following.  Let $X_1, X_2, \dotsc, X_n$ be iid and $Z$ be independent of the $X$'s. Then $X_1+Z, X_2+Z, \dotsc, X_n+Z$ will satisfy your requirements. This is related to the representation theorem of de Finetti so quite general. 

*A copula is a joint distribution where all marginals are uniform on $[0,1]$. After simulating that, you can just transform the marginals with the usual quantile transform (probability integral transform).
