You need a separate list of indices. You can either generate it every time you want to fetch a new index or just keep it synced with the data in your array. It shouldn't be that costly to generate a new list every time, unless your array has thousands of values !
edit : I edited Seasky's example to illustrate both methods.