While I agree that the purpose was to make sure people were armed, the intent was to limit Congressional power. Nothing more. It did nothing but tie the hands of Congress. No grant of rights. No arming the people. It did nothing in the affirmative. It is a prohibition.The second amendment wasn't written to arm the militias, it was written to arm the people, in case a militia was needed to be formed.
The second amendment did not authorize the people to be armed, because they were already armed. It recognized that the people had a right to be armed, and that right should not be infringed.