RandomPkg defines a set of function methods for randomization with a uniform (range or set), discrete (weighted), Normal, or Poisson distribution. Calling these methods from within sequential code provides a form of constrained random test generation.
For randomization within testbenches, also see [CoveragePkg]. CoveragePkg supports randomization across holes in the coverage, "Intelligent Coverage". Intelligent coverage is a good for randomizing the top level of a test.