TL;DR: If two antennea have the same frequency response (or close enough), impedance, and physical connector, they should be completely interchangeable.
Antennae are tuned to frequency ranges. You can certainly have an antenna tuned for a wider range of frequencies, but it will be less effect give than an antenna tuned for a single frequency. The "5Ghz" wifi spectrum actually goes from 5030MHz to 5990MHz - they are likely tuned around 5500MHz, and just slightly less effective the further away from 5500MHz you get. You can physically modify the shape to make the drop off sharp (for a small frequency range), make the drop off slow (for a wider effective frequency range), or a combination of both (good over a range, but then drops off rapidly). It should also noted that otherwise designed in, being tunned for a frequency usually means it effectively tuned for multiples of that frequency as well. Something tuned for 2.4GHz (really 2.4-2.5GHz) is probably also good at 4.8-5GHz. Again, it sliding scale of effectiveness, where frequencies close to the main frequency work fairly well. You really need to look at the whole frequency response to get the full picture. For the purposes of wifi reception, most antennae are going to be roughly the same unless someone has taken the extra effort to make a 2.4GHz or 5GHz optimized antennae.
Antennae are also impedance tuned to the their connectors/circuit boards/interfaces. Any impedance mismatch is going to cause internal reflections and as a result signal loss. This is really what is likely to cause you issues when mixing and matching.
And then you have the physical connector. Usually devices with the same connector have the same impedance, at least with standardized connectors. For specialized connectors from a consumer device - who knows. I'd hope to maintain some sanity that they have them spec'd the same.