generates arrays of random numbers and outputs dat file