Inspiration for Batman villains?

I recall reading long ago that the Penguin from Batman was inspired by a cartoon on a cigarette pack. I don’t remember any more details than that. What was the inspiration for the Joker? The Riddler? Were these villains just thought up out of nowhere or are they supposed to be modern-day adaptations of folklore or classic characters?

This thread

discussed the inspiration for The Joker.

Conrad Veidt from the film The Man Who Laughs was the main visual inspiration for The Joker.

Before Batman had his grotesque lineup of characters, Dick Tracy had his.

Ultimately, it’s a way to give the villains character, so they’re not all guys in bad fediras trying to bump off Our Hero. So each viollain gets a shtick. Sometimes they click, sometimes they don’t. But at least they physically looked different and enabled you to tel;l one from another. And in a comic or comic strip, the visual difference (as opposed to non-visible psychological difference) was pretty important.

Don’t know if that part is true, but at one time many years past, the Kool brand did use penguins in their ads.