Store your array in temporary file to decrease memory usage when having a very very big array.