Multiprocessing with sorting arrays