Sorting Array assignment