In reply to kernalmode1:
Your problem has nothing to do with unique constraints. The problem is as I noted above, the LRM does not allow size constraints on an associative arrays. (See section 18.4 Random Variables). What would be the behavior if the array was already populated with random index values?