This line is a light play on "Rub-a-dub-dub," that weird bathtub nursery rhyme about three men in a tub.
Most variations of the English nursery rhyme "Rub-a-dub-dub" include "the butcher, the baker, the candlestick maker." Here Sly replaces a baker with a banker, maybe to keep up with modern times, and sticks in a drummer to make the line relevant even to his own band. The point of the line is a little obscure at first, but the whole song ends up playing out as a listing of diverse and disparate groupings that manage to come together. This light allusion to nursery rhymes is just the beginning.
This way of talking about diversity and togetherness was pretty revolutionary in 1969, but by 1998 it was mainstream enough to be a Toyota commercial.
It's worth noting that "diversity" advertising has been around for a while, and Nestlé and Toyota are far from the only companies to use lots of happy, diverse faces gathered together as an advertisement for their products (United Colors of Benetton comes to mind, among dozens of others). This isn't necessarily a bad thing, but at the time Sly was writing, Martin Luther King, Jr. had just been murdered for his conviction that there was a way for people of all races to live together in the future. In a historical sense, the message of "Everyday People" was a message of political resistance, even if its cheerful hippie groove is light enough to sell candy now.
This line became a catch phrase that shows up in all kinds of strange places, thanks to the double (or triple) entendre powers of the word "strokes."
For example, the line inspired a 1970s and 1980s television show, Diff'rent Strokes, about a rich white Manhattan family who adopt the son of their deceased African American maid (maybe an unfortunate take on "diversity," but that's another discussion). It has also provided a title for countless other disparate projects including golfing associations and at least one charity set up by survivors of (literal) strokes.
"Strokes," as it turns out, can mean a lot of things. In the Family Stone context, it seems to be a slang term for something very general like "preferences." But the noun "stroke" can clearly also be interpreted as a dangerous medical event, or as a physical act (we're thinking stroke of the golf club, and you should be thinking that, too: a stroke in this case is defined as "a controlled swing intended to hit a ball or a shuttlecock"). If you were hoping for a sexual double entendre, Merriam-Webster is always here to remind us that the definition of the verb stroke is far more suggestive than a mere strike of a ball with a club: "To rub gently in one direction." In all likelihood, Sly (who was born Sylvester and didn't get the nickname Sly for nothing) was playfully allowing "strokes" to mean whatever we think it does.