There are two ways you can go. You can get a P-TTL capable flash, which communicates with the camera and does all the nifty automatic stuff. That usually means spending a little more. You won't have to worry about voltage, and you can pick features you need. A really good summary of the possible P-TTL options is in this thread:
https://www.pentaxforums.com/forums/pentax-camera-field-accessories/43215-pen...omparison.html
Or you can get a flash that allows you to control the power yourself. That includes many possible options, including some already suggested here, old and new models. It's a little trickier to make sure the voltage is compatible, and get exactly what you need. One advantage of this group of flashes is they are typically easier to adjust, while the P-TTL group have complex interfaces for all the options.
I considered this for a while and decided to try the Pentax AF540FGZ. It does just about everything, and on paper, it ought to be great. But of all the fully automatic camera features, I think flash is the least reliable. That sucks because when I want to use the flash, I just want to bolt the thing on, put it in P mode, attach an AF lens and blast away. When this doesn't work perfectly, it's annoying. I keep thinking I should really learn something about flash, then get a manual version and control it myself. I am still considering that, the sticking point being learning about flash.
I think the big features are tilt and swivel and the power to use that. I wanted a flash with its own sensor so I could use it in non-P-TTL mode if necessary. That's because my wife blinks at the pre-flash sometimes. I could do without a zoom head but I'm probably the oddball here. The beam to help AF seems to come on when it's too dark; anyway the K-7 has its own beam so that's not a big deal any more. I don't feel competent enough with flash to discuss the other features.