MekHQ already has random abilities built-in to its personnel generation, with an adjustable chance based on the personnel's experience rating.
What I typically do is build a unit by hand, and add them to the roster by using MekHQ's randomised personnel generator until I hit one that has the same experience rating (which will also automatically include randomised qualities like name, age, planet of origin, bonus skills, and special abilities).