Switched to indirect sorting with allocated IBD message arrays. Should behave nicer with modern numpy