For that situation I recommend creating an array with the text IDs and shuffle that.
if(!isset($texts)) {
$texts = [
'TX01',
'TX02',
'TX03',
...
];
shuffle($texts);
registerVariable($texts);
}
And the to display the texts and questions via PHP code, such as:
text($texts[0]);
question('AB01');
text($texts[1]);
question('AB02');
Note that this will NOT store the information which text was shown at what position. It simply rotates the texts.