As ClockworkOcean said, you have to do it specifically as there is no build in way.
Basically, you would have to store which value was last and then either remove next one from the array before randomization or use randomize until you get different value than the next one.
Based on your question, you want a function that returns a random value, the next time it’s called, it will return another random value, but not next in order.
Here are two fundamental approaches to get you started, they are not really optimized and the first one is pretty error prone.
When using unreal’s random, be aware of using both of it’s outputs at once (value/index), as it is a pure function, so it may/will be called twice and you will get two different values.
The type of the parameter for the function is undetermined. Try selecting the function node and setting it’s parameter type to the one you are using.
By the way, it’s better to spend more time trying to understand something chunk by chunk rather than just copying it (IMO, it’s one of the best advices I could get)
If you remove it, you can’t possibly get it again.
And you could also work on a copy of the array if you ever want to restart the randomisation from scratch. Ideally, one would add an array bounds check here.
This was too complicated for me so I extended my flat cube geometry platform instead. The previously had only one cube. So spawning with front SP and then Back SP would overlap the first and third cube along z axis. So I simply added few more cubes, shifted spawn points and also added rotational transform to create more randomness. Thanks for your help though. Your solution will help me if I encountered into such issue again.