A generalization of correlation functions and the Wiener-Khinchin theorem