Applies a windowing function to an array of data, making it ready to be FFT'd.