This is more like your example from 8.
SELECT * FROM [Table]
( -- parentheses to cast a table having one row and one field as a scalar
TABLE CALL ValueSequenceRandom(1, [mfd_id])
However, you will see that each run will select the same random sample, because a matching seed (mfd_id) is used for each call to ValueSequenceRandom.
That's both good and bad. [And it will be the same for your use of ValueSequenceRandomInt.]
To get a different sample on each run, as in 8, you'd need to add a script function to return e.g. a time-dependent seed value--or as a quick hack, an adjustable constant as a factor.
[You will know this but I will point it out. Your example does not guarantee 20 samples, in case the random sequence has duplicates. This example will always return 20 regardless.]