sort for any array