Massachusetts has nothing to say about where you can go barefoot.
No Massachusetts law prevents you from going barefoot anywhere in the Commonwealth, including restaurants, malls, grocery stores, movie theaters or even driving a motor vehicle.
No federal laws force you to wear shoes at any given time or place, even in church…