We used to watch the Danny Thomas show back then, and they had an episode where Danny gets stopped in a small town by Sheriff Andy.
I am not sure if it was intended to introduce the Andy Griffith show or that they just liked the idea of that episode and decided to make a new show.
I do know the first two or three episodes they had Andy as the comedian then very wisely changed him to the straight man with the other characters playing off him.
But he died before obamacare fully kicked in. I wished he lived long enough to see and experience obamacare firsthand. I really wanted him to eat crow over that.