It's also possible that the Yoshi data is stored as something like a 4-bit number, with each bit representing the powers it has: 1 for a normal green Yoshi, 2 for fire, 4 for stomp, and 8 for flying (So fire+stomp would give you 6). Thus they could get a unique value for any combination of powers. Which wouldn't come into play (you'd only get a Yoshi of value 1, 2, 4, or 8), unless you add into that the shell colors. You treat shells the same way, and simply take the boolean OR result of the two (Yoshi color OR shell color) and you end up with whatever powers either had. Thus a red Yoshi (2) holding a blue shell (8) would have the combined value of 10.
But that's all just a guess.