Sort array task.