Sort array.