Even the Heller Decision only recognizes the individual right to posses a firearm for self-defense inside the home and only applies to individuals who are otherwise legally permitted to own a gun. It does not apply to individuals not permitted to legally own or posses a gun, like felons or someone adjudicated as mentally incompetent.
It doesn't assert an individual or collective right to take up arms against the government as the Constitution expressly prohibits any such action. Treason, rebellion, or insurrection are not rights sanctioned by the Constitution or any amendment nor is it the purpose of any amendment to sanction or protect such actions.
Simply put, one purpose of the Second Amendment is to give the people the means to protect the government and the people from invasion, rebellion, and the tyranny of the mob. The overarching purpose of the Second Amendment, however, is the same as it is for the rest of the Constitution, which I might address at some later time.