gave me the idea to have another variable that is restricted to the amount of “sets” of numbers you want, then set the distribution on that variable rather than the variable that belongs to one of the sets:
rand bit [1:0] selector; // Range of variable values to represent number of sets
rand int value;
constraint set_dist {selector dist { 2 := 20, 1 := 30, 0 := 50 };}
constraint dist_name {selector == 2 -> value inside {1,5};
selector == 1 -> value inside {0,4,7};
selector == 0 -> value inside {2,3,9}; }