A data-driven approach for multiscale elliptic PDEs with random coefficients based on intrinsic dimension reduction