RNG "summoning" ?

Is it possible to have an rng mechanic to produce new characters randomly? 


An example would be something like this: 
Of course, it is possible, although you will need to make a list of random characters beforehand, then create a function:


function getRandom(min, max)
{
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}


and apply the result of it where you want: either to data character ID, or event ID, or else
Alright, thank you very much Yurii!

Original thread: https://forums.rpgmakerweb.com/threads/rng-summoning.67042/