Assuming one-shot guest appearances as other characters don’t count: Dick Van Dyke, Lucille Ball, Hal Linden, Judd Hirsch (Taxi), Walter Brennan (The Real McCoys), Jason Lee (“My Name is Earl”), David Schwimmer (Friends), Danny Thomas, Ernest Borgning (“McHale’s Navy”), Fred McMurray (“My Three Sons”), Elizabeth Montgomery, to name a few.
Wow. The big city sure changed him.
I’ll take you back one step further–Gavin MacLeod had a supporting role on McHale’s Navy years before MTM and Love Boat.
Not a sitcom, but David Letterman was a supporting player on the Starland Vocal Band show.
And, IIRC, Robin Williams was on the attempted Laugh-In revival a couple of years before Mork and Mindy .