I don't quite see the need for either of those things. Why special uniform colors? Starfleet does just fine with the three colors that don't tell engineers apart from guards or astromycologists from surgeons. What need would there exist for a special color for artillerymen or airborne infantry?
The thing I've always found oddest, esp during the TOS/DSC era is that armory personnel (technicians) are grouped with "command" (mostly specialist/operators) whereas security guards (specialists) are part of engineering (technicians). Now there is limited logic to the former (they are both "warfare") but the later doesn't make sense at all. The TMP idea of grouping security with services in a different colour makes much more sense. The need for differentation between medical and science is less significant, but I certainly support them having different
badges even if the uniform colour is the same (fore instance, McCoy should wear sciences with a medical insignia because he's a researcher, a security team medic would wear a services shirt with a medical insignia.
And why ground-based ranks? Starfleet does just fine without giving its pilots air-based ranks. And we see in "Nor the Battle to the Strong" and "Siege of AR-558" that Starfleet's de facto ground troops, with the special uniforms (but with perfectly regular colors), go by navy ranks: we see an Ensign in the former, and hear of the latter having been commanded by a Commander whose boss was a Captain.
IMO it makes sense for Starfleet's
rapid response ground contingent to use Starfleet ranks (essentially a mix of MAAs, EOD, SO/SB and Seebees with MST (CG marine sci techs) and HM/HSs as needed), as they need to be able to integrate in a ship's crew and operate alongside them.
On the other hand, any "big army" wartime deployments are likely to draw from personnel of Member World's security forces (ala US National Guard) and these would not necessarily use Starfleet ranks (The Sol system's Terresterial Defense Division presumably does because they are mostly co-located with regular Starfleet). For instance, Pacifica Defense uses commandant as a
rank not a title, it's not clear what it corresponds to, but it's certainly a senior rank (in the RW, commandant is usually used in place of major so roughly LCDR), and the Bajoran Militia use non-naval ranks, though in a slightly different configuration that the modern US military.