I have noticed, however, that in _My Little Pony_ (which I've finally gotten around to watching), it seems like earth/pegasus/unicorn traits are not races or subspecies analogous to human races but instead likely follow a polytomous liability threshold pattern. Why? Because we see the Cakes, two earth ponies, manage to have a pair of pegasus and unicorn fraternal twins, and when queried, mention they have some pegasus/unicorn ancestry. Since the pony type is mutually exclusive (we never see any pony who is both pegasus and unicorn, aside from the alicorns who are special magically-created cases), I don't know of any kind of common Mendelian trait pattern which would give a single type, normally breed true, and allow two earth pony parents with mixed ancestry to have kids who are both unicorns and pegasi (one non-earth-pony offspring would be fine as it would simply indicate a recessive discrete trait, but two different others? I don't see how that works unless you postulate some sort of multi-locus Mendelian trait with dominance of earth trait by both unicorn and pegasus, I guess?). Whereas if it's polytomous liability threshold, then that would be possible albeit unlikely, since they could inherit different fractions of ancestry and get pushed across different type thresholds.
In the Dune case a very Mendelian concern with preserving a few important mutations in very narrow bloodlines could be combined with a secondary requirement for high IQ, physical fitness etc. that could be (inefficiently) satisfied by focusing on "well bred" aristocracy that benefits from marrying genetically far above average people.
With regard to the X-Men, I think they imply the "present day" is a Cambrian explosion, that then settles down in the far future into the most useful powers becoming common if less godlike levels: immortality, psi, telekinesis, and any other boring wish fulfillment.
However, in the cases where the mutation seems to not be directly inherited, the explanation lies in the "implementation details", as it were. When the X-gene activates (due to puberty, stress, etc.), it releases a protein that goes on to cause mutations in surrounding genes, seemingly at-random but not so random that you have "mutant" teens dropping dead of sudden protein deficiencies.