How can I Format Text From Text Array?

I’d like to have a certain number of that in the text format, and I’d like to connect the array so that only the parts that match the index of the array are included. What should I do? The best way I’ve come up with is to start from the beginning and check that the index of the array is daily valid. This method is so terribly dirty.

This is the best method I’ve ever thought of.

Please tell me there’s a better way.

Hey, did you found a good and nice solution to handle this?
I would like to have an array of formated texts and randomlu display one of them.
Thanks!