How to find all indices of an associative array

In reply to dave_59:

Hi Dave,

I want to capture the indices into a queue to use one of them (randomly picked) as the id that I want to use in my transaction. find_index with (1) works. However, I had to declare index_q is of type warp_id_t. Does the returned queue should be of type index, right ?

Also, how does find_index with (1) works internally ? ( I see this is something similar to while(1)), but I want to understand the internal working of the search.

Thanks,
Madhu