[RMMV] Random Variable without replacement

I'm trying to make minigame where random variables are used, which is sort of a spin-a-wheel thing depending on the actors in the current party. It goes along these lines:

1) Random variable X rolled between 1-6
2) If actor X is in the current party, win a prize
3) Else, remove X from the possible pool of numbers
4) Roll again and repeat until X is an actor in the current party

I want to make it such that the pool of prizes change depending on your current party members (3 at a time, 6 total).
I know it is possible through brute force methods, which will require 6C3 = 20 conditionals. Is there a more elegant way to do this?
only with scripting
the default randomizer in control variable command has no options to do this.

with script commands there are several other approaches, but I don't know the javascript syntax to give them to you.
Code:
while (true) {
var rand = Math.randomInt(6) + 1;
if ($gameActors.actor(rand).index() >= 0) {
$gameVariables.setValue(any id you want, rand);
break;
}
}
This script call does not remove the current number from the possible prizes, meaning there's always a 1d6 chance. If you want to have a method that does remove it from the possible prizes, then assuming the 1-6 roll is always 1-6:
Code:
var arr = [1,2,3,4,5,6];
while (true) {
var rand = Math.randomInt(6);
if ($gameActors.actor(arr[rand]).index() >= 0) {
$gameVariables.setValue (any id you want, arr[rand]);
break;
}else arr.splice (rand, 1);
}

Then just read the variable of the ID you set for the final value.
var arr = [1,2,3,4,5,6];
while (true) {
var rand = Math.randomInt(6);
if ($gameActors.actor(arr[rand]).index() >= 0) {
$gameVariables.setValue (any id you want, arr[rand]);
break;
}else arr.splice (rand, 1);
}

This helped acomplish what I was trying to do, thank you so much @Poryg!

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-random-variable-without-replacement.106688/