Or with a short list of possible values - 16 in your example - you can generate a complete list and "shuffle" it like a deck of cards. Then deal out the first "n" cards to get a random selection. Shuffling is kinda like:
This is common in card games and lottery number pickers. If your max might go into thousands, it would probably be slow.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi