Sort an array of custom objects using order of key in reference array