Implementing the random() function for HMM distribution

@lucianopaz works the most with random generation method currently, so I will direct this to him :slight_smile:
FYI, for HMM you should check out How to marginalized Markov Chain with categorical? which is a faster implementation.