title: Assign a random number from range X for each element in list Y
body: <p>I need to assign a random number from a range X for each element in list Y while minimizing the number of duplicated numbers from X.</p>
  
  <p>To clarify, I do not want a situation where I have an excess of number <em>i</em> from X while number <em>j</em> from X is not used.</p>
  
  <p>In their a computational efficient way to this? I'm happy to use a library.</p>