Instead of trying to do mergesort in place, I allocate new arrays as the usual implementation.