How many coupons & what characters are you using? Let say that you need 50 & are using ABCDEF (base 6), so that gives you 46,656 combinations. For this example, you could do something like this...
- divide the max number by needed (46,565 / 50 = 933.12)
- take the floor of that number 933.
- now loop 50 time to get a random number between 1 & 933 & add it to the loop index times the 933
- convert that number to base 6
This would give you a randomly selected value every 933 spaces, so you know that you would have unique coupons & they would not be guessable.