You could implement that by setting the X3_HORSE_RESTRICT_race flag on the mounts (see Lexicon).
The goat would still shrink (and horses would still get larger for half-orcs).
You can work around that shrinking to some extent by playing around with the mount model and mounted appearance scalings, so that's there's a closer match for the mounts each race is allowed to use. For example, you could make a goat which is the right size for a halfling (just by adding a scale directive to the decompiled model), then set the halfling mounted scaling to 100%, with a slightly different figure for gnome. You can also by-pass the mount and dismount animations, which will otherwise look odd.
However, a full set of mounting animations with no shrinking would be a huge amount of work, requiring skills that few of us possess, which is no doubt why the scaling system works like it does.