Unlike militias of the past, in the Hamilton papers, Alexander Hamilton viewed new militias as constituted directly of the people and managed by the states, is not a danger to liberty when called into use by other states to do things such as quell insurrections.
"It is, therefore, with the most evident propriety, that the plan of the convention proposes to empower the Union 'to provide for organizing, arming, and disciplining, the militia, and for governing such part of them as may be employed in the service of the United States."
Hamilton states that
a well-regulated militia composed of the people will be more uniform and beneficial to the "public defense" of Americans. He argues that an excessively large militia can harm a nation's work force, as not everyone can leave their profession to go through military exercises.
https://en.wikipedia.org/wiki/Federalist_No._29
It's clear that according to Alexander Hamilton, a state-regulated militia, were men that were provided arms, trained with field exercises, synchronized and worked as a unit. There is no other way to see this other than Alexander Hamilton intended a 'well-regulated militia, to be what we now call the National Guard, men and women who are equipped, trained and called up when necessary by the Governors of the states who have control over their National Guards, but the President has the authority to federalize them.
All the IRA bullshit about 'militia' and 'right to bear arms' is a fairy tale intentionally created to give freedom to men and women who just want to own weapons of war. That's not what the Constitution and the Federalist papers make very clear. A 'well-regulated militia' is nothing other than the existence and maintenance of the National Guard of each state. Men and women, free to buy any sort of weapon they wish, is not what the Constitution clearly spells out.