Implement next of kin sorting based on position in array