Refer to a string array that is smaller that the trial array in the same loop?

Is anybody able to help? I think the post may be a little be confusing, so I am focusing on just one question (I am also changing the name of the topic accordingly).

I guess the main problem is that I would need the prompt_breakTrial2 textComponent to randomly select a question out of a smaller set as compared to the set of trials presented in the fmaskTrial - primeTrial - targetTrial flow. If I create another variable in the condition file attached in loopTrial with the questions to select from, it may be the case that the empty rows will be selected, which is something that must be avoided. So, the issue is:

How to have a textComponent select one among a given set of strings, which has not the same number of the trials?

I did found a way to do this in python, that is defining the strings (in my case, the questions) as part of an array, shuffle them and then tell the textComponent to choose onw of them:

# Begin experiment
questions = ["What is your name?", "How old are you?", "What is your best friend's name?"]
shuffle(questions)

#Begin routine
$questions[loop.thisTrialN]

But I am just not sure the shuffle command is available in PsychoJS. Is anybody aware of it? or, Does anybody have a different/easier solution to the problem?