For example, 'text' might turn into 'xtet'
I know how to do an array but nothing else.
'0587'.chars.shuffle.join. This creates an array with each character in the string, shuffles them, and then joins them together to make a string. (btw if this answered your question, mark this as the best answer)