How can faux correlated data be generated for testing or training?
Remember that the power spectral density (PSD) of anything is the Fourier transform of the autocorrelation function of that process.

Hence, if you want a defined autocorrelation function (ACF), do its inverse Fourier transform, and you'll get a PSD that would represent a signal of given ACF.

Now, you can use all the beautiful methods of filter design to come up with a filter that, when applied to a white process (e.g. random numbers from a random number generator) will shape that process's PSD as desired!

So, that's kind of the general look at things: If you just want something like


  "Each sample should be correlated much with the previous one, but only slightly with the one before"


then maybe understanding it as roughly 

$$y[n] = 0.9x[n] - 0.1x[n-1]$$

would get you there quicker: $(0.9, 0.1)$ is actually the coefficient vector of a FIR filter that you can apply to your uncorrelated input vector $x$ and be done with it.