The second amendment was referring to "the people at large" -- those who were expected to take up arms to "execute the Laws of the Union, suppress Insurrections and repel Invasions." This would exclude non-whites, women, children, the infirm, non-citizens, Indians, and prisoners.
Perhaps states protected the individual rights of others to own firearms. But the second amendment did not.