Because you are using PHP, you can use a trick not available in most languages - creating array elements indexed 'arbitrarily' at run-time.
When you generate a value, create the array element indexed with that value. BUT, before you create the value you test it to determine if it exists. If it already exists you need not save (although saving wouldn't make a difference since the value is the same).
$arrQuote[111] = '111';
$arrQuote[222] = '222';
if you a specific size for the array, test its length and stop producing entries when you have enough.
Also - remember that with PHP you can have character-based indices - so it works with alpha strings as well. If the order of generation is important, create each array element as a 2-dimensional value, one of the values being the creation order, the other, the value.
Go through the array with foreach() and the indices don't matter, and if you need special sorting, sort the array before the foreach() analysis.