Generates random numbers, then sorts them into the correct order.