Scalar correlation functions in de Sitter space from the stochastic spectral expansion