Star Trek and The Andy Griffith Show were sometimes filmed on the same lot. Specifically, the episodes "Miri" and "City on the Edge of Forever" used the lot that was also used to represent the town of Mayberry. You can view more pictures of this connection at the link.
Link via reddit | Image: Paramount
What was the set originally made for then?