OTOH, Irene Ryan only played one role successfully, and Bob Denver two. Keaton, Williams, and Martin were successfully comedic in multiple roles.
True, but for Williams and Martin I think they were funny to a lesser degree. I loved Steve Martin in the "man with two brains." I thought he was excellent as the Dentist in "Little Shop of Horrors", but the rest of his comedies, while funny, were not rolling on the floor funny, at least not to me.
I feel similarly regarding Robin Williams. Robin Williams was very funny in "Good Morning Vietnam", but I can't think of any other rolls by him that I thought significantly funny. I didn't care for "Mrs. Doubtfire."
Now I will say he also did quite a lot of good Drama, and he was a very gifted Actor/Comedienne, but I see most of his humor as being derived mostly from his schtick, and it was generally behavioral comedy that was his strength.
Irene Ryan, on the other hand, was just hilariously funny in nearly every episode. She had years of being funny, and a lot of the humor was probably derived from the character she played, and would likely also have been funny if a different actress had played it, but Irene Ryan just had that spark that made the role work fantastically.