Depends on the state. I know in AK, personal arms are maintained in family housing. They sell them in BX too. Even in the People’s Republic of NY, long guns could be maintained in family housing.
Obviously base housing allows, based on testimony above. That was not allowed at the Navy bases I served at.
And the only way to keep a weapon on the ship was in the armory.
Army buddy here says same for his time in the 80's in both Germany and US.