Shuffle MIDI Notes

Is there any way to create a ‘shuffle MIDI notes’ function that is similar to the shuffle notes transformation in Sibelius? This would keep the note rhythms of a MIDI clip the same but randomly shuffle the notes into different positions. It’s different from a randomize notes function as the notes would remain the same, just in a different order.

Any advice would be great!