Like Andy said, you could use a BitSet which is a fast/efficient way to do this without changing the original array.
import java.util.BitSet;
import java.util.concurrent.ThreadLocalRandom;
public class JavaTest {
public static void main(String[] args) {
int[] numbers = {0,1,2,3,4,5,6,7,8,9};
// create a BitSet with # of bits == number of indices in numbers
BitSet set = new BitSet(numbers.length);
// while not all bits are set in the bitset, do this loop
while (set.cardinality() < numbers.length) {
// choose a random number within the [0,N]
int randomNum = ThreadLocalRandom.current().nextInt(0, numbers.length);
// set the corrsponding bit in the bitset
set.set(randomNum);
// report the number and progress
System.out.println("New number chosen: "+randomNum+", total indices chosen: "+
set.cardinality()+" of "+numbers.length);
}
}
}