Thank you, Garry for answer. Yeah, it seems that random hints produce so many problems that I better consider changing them to context-specific hints. Development of my game is in early stage. However, the algorithm might be useful in another situations (random events that do not change the ability to complete the game, but make the game more attractive and possible to play many times).
Unfortunately AdvSys has no indexed arrays. However the list approach is very easy and the algorithm is fast. Shuffling should be possible as well.