Add a new routine to generate data from a probability mass function.

A new routine is added that take a table with a discrete probability distribution. It then generates a predefined number of results based on that distribution.