Both the Star Trek and the Untouchables episodes took place in the early '30's, so what we're seeing is a not-yet-realized Mayberry.
Only problem is, I believe The Untouchables took place in Chicago, as did the Star Trek episode. That means that Mayberry was Chicago - a fair ways from Mount Airy, North Carolina.