Sort multiarray