random(1,3) outputs a number from 1 to 3, but with the random, you will never have 3 exactly, at most a 2.99 for example. When you cast it as an int, you don't do a "round", you take the int part of the number, making it a number between 1 and 2. What you want is this :
ArrayAt(round(random(1,3)))