NOTE: It is still my contention that Star Trek did more than the TV westerns. It was very multi-racial/multi-ethnic for it's time. The bridge of the Enterprise was rainbow of men and women working in unison. In addition, Trek could get away with stories that other shows could not, because it was in a fanciful setting. It could make direct comments about race hatred and segregation (i.e., it's stupid), because the message more easily slid past the censors.
I never watched many westerns when I was younger, so I was surprised when watching some in recent times just how much they were doing the same sort of thing. Whereas Trek could do allegorical stories because it was in a futuristic setting, westerns were able to do them because they were in an archaic one...but often more on the nose because, to use the example of stories about bigotry/intolerance, they were using actual ethnic groups and putting authentic-sounding racial slurs in the mouths of the intolerant. Trek definitely deserves its credit for the future it depicted and the stories that it told, but it wasn't doing so in a vacuum.
(On a completely off-topic note, Trek fans who aren't familiar with The Rifleman
might be interested to know that Paul Fix--Dr. Piper from "Where No Man Has Gone Before"--was a regular on the show, and much better utilized as the marshal of North Fork.)