Added a algorithm that devides the arrayin ass many small arrays as there is supposed to be threads. Puts the rest of the big array in the last new array