In any case, the Constitution is a limiting document. It restricts what the government is allowed to do. In the context of the 2nd amendment, it is not allowed to create arms control laws. It does anyway. Differences in the de facto exercise of rights between citizens and non-citizens are likely due to different levels of access to the court system and in relative political clout, rather than some underlying intent that is not obvious in the document itself.
By plain reading of the law, "the people" means the people. It includes any humans acting in their own capacity, as themselves, rather than as the agents or representatives of another legally distinct entity. Begging the pardon of the state, and its judges, but the people do not find it convenient for the state to redefine what personhood means, especially when done in a way that skirts the limits set forth by the people for the government.
You have to be a lawyer to think that "the people" does not include any person. A non-lawyer can apply the common meaning of the word and use it without stopping to argue over whether it means what it means.
I don't give a fig whether it is about Mexicans or Tenctonese. If they are people at all, they are people who have the right to keep and bear arms.
Besides that, if "the people" were so defined as to include only those people who created the government, I, as someone born more than 200 years later, would certainly not qualify. If you exclude illegal aliens on that basis, you exclude everyone who did not explicitly ratify the original document, which is to say almost everyone alive today, excluding only those who have sworn an oath of office. If I am not thus protected by the law, I am not obligated to follow it. Do we really want to open up that can of worms? Lysander Spooner's "No Treason" essays may elucidate further, but I think perhaps it would be a greater boon to civil order if we agree that "the people" are not necessarily a specific subset of people.