Depending on how many digits you need, the size of the array and whether the array should keep its order, you can use std::random_shuffleto change the order of the array, and then just loop from 0..n-1 to get n random numbers. This works better if you want to get many numbers relative to the length of the array.
If it does not fit, you can just use srand()and rand() % nas an index into the array to get a pretty good approximation of a random selection.