Is there a built-in function for sorting arrays or do I have to code one?