OK, here it is. I was going to write a big dissertation with citations of law, but I'm tired and it really needs a whole book. So here's my opinion, subject to future modification.
Militias can be either a supplemental arm of government forces, or
an army of non-professionals fighting toward specific goals. (E.g, democracy, freedom, Mom and apple pie.)
In AZ, by law everyone from 18-45, men AND women are in the State Militia. Which may, in theory, be called up by the Governor, but never has. There are various groups that purport to be sanctioned militia's, but they aren't. However, they are out there, on the fringes, preparing. For something.
In reality the "militia" is meant as a last ditch call-up to defend the state from say an attack by "Calimexico." Especially if they don't stop stealing OUR water!
In a WROL or SHTF type situation, local "militias" or "unsanctioned auxiliary police forces," would likely form up to defend subdivisions, or towns/regions. Non-government militia's can really only exist when there is a void of formal government and lack of civil order. Or, when government police/military are at odds with, or a danger to, the Will of the People to such an extent that armed intervention is their only option.
Militias differ from gangs, warlords or cartels in that they operate for political and sociological reasons, not personal profit. Not that the edges can't be blurred.
My experience in central america was most were death squads, operating under various fluid government protections. The Contras fell under the militia umbrella. A semi-legal force, tolerated by the govt, with outside (US) financing and supply chain. Others like the URNG in Guatemala were defending the People against a genocidal right wing government. They were largely self financed by robbery and local "taxes," often collected at gunpoint via rural roadblocks.
In Guatemala in the 80's there was a mass conscription of campesinos into govt sanctioned local militias. Refuse and you were shot, maybe your family too. Like the US, it was a country divided.
Based on past actions, current US "militia groups" such as the Proud Boys, Oath Keepers or NFAC/Antifa factions, in my opinion would fall into the death squad category pretty quick if the constraints of law and govt were removed.
We are unlikely to ever see fielded armies on US soil. Not like CW1 or the revolutionary war. The technology precludes that. Short of foreign intervention, which is so unlikely as to be unworthy of much consideration.
While we may have a lot of rhetorical infighting and opinion differences in the US these days, anyone who has witnessed our military in action understands there is no force capable of going toe to toe with us in a slugfest. Which doesn't mean an insurgency is impossible.
A guerilla war in the US, fought by "militias," is possible, perhaps even likely at some point in the future. I suspect it will be a distant future though, even considering all the current political differences. We are seeing many warning signs which
can lead to civil war, or regime collapse, but
none of the actual actions. No general strikes, extended trucker blockades, economic collapse, infrastructure destruction, desaparecidos, or widespread rioting brutally crushed by govt forces.
When I arrived in Nicaragua in 1979, they were in the final stages of taking down the Somoza regime. The Sandinistas "owned" the countryside. They had near universal popular support, and were moving on the larger cities. Yet they only had about 6,000 teenage fighters, but once people saw which direction the wind was blowing they jumped aboard in a ground swell. Blowing up people's homes, driving them into poverty, and killing them tends to cause anti-govt sentiment.
At my age (70) if our country devolves into chaos, I'll be focused on not starving, keeping my own **** in order and not being a threat to the powers that be. Any fighting will have to be done by younger folks. But I don't see much of the fortitude or interest in most people to look up from their cell phones long enough to overthrow a country. To them, "the dictator is the dictator," and they really don't care who it is, so long as their EBT cards work.