Rearranging joint names index array.