You have your rand [1,2,3,4]
you have your array ["word","word","word","word"]
"triforce" you have your solution
array[rand] = "word"
That is true in AppLab as it is in many languages. "triforce" my guess is that the execution is not your issue, but understanding.
Here is my reference:
App Lab Docs | Code.org[
^]
Learn to google, then learn to question, and always learn ^_^
Regards
Andy ^_^