Function to sort an array, in this example, used in conjunction with getCustomTypeData.