array sorting for mixed arrays.