I use many lenses from most Pentax generations on my 645D's and 645Z, and almost all of them have worked very acceptably for me. Only 2 didn't... the older FA 645 45mm f/2.8 prime, and the new DFA 55mm f/2.8 prime. The old 45mm is well known not to be the sharpest knife in the drawer; for landscape work or anything else needing good, consistent edge-to-edge rendering, it's not what I want. The new DFA 55mm is certainly better, but in terms of edge-to-edge performance it didn't have what I was looking for in a high-priced modern optic. 55mm was not a critical focal length for me, but I'd been hoping to use it for the decent f/2.8 max aperture, modern autofocus, etc. In the end the optical performance I felt wasn't worth the money so I sent it back. I do know others are happy with this lens.
All other A, FA, DFA and DA 645 lenses that I've personally used, plus some 67 lenses, have been anywhere from good to outstanding. I have the DA 25mm, A and FA 35mm, FA 45-85mm, A and FA 75mm, FA 80-160mm, A 120mm Macro, FA 200mm, FA 150-300mm, FA* 300mm f/4, FA 400mm, a few 67 models like the 105mm f/2.4. And a few others. I'll use any of these without reservation. Very few were bought new; most I bought used from KEH, eBay, or direct from individuals.
Asking which lenses are better than others, though, is a bit of a loaded question. Better in what way? You'd need to describe more of what your desired application is, your subjects, shooting style, budget, tolerance for usability quirks, etc. There are many trade-offs in lenses and what's excellent for me (tripod, low ISO, static scenes, manual everything most of the time, etc.) may not cut it for you.
E.g. for portraits you could spend serious money on the new optically stabilized DFA 90mm f/2.8 Macro, or you could spend peanuts on the old manual 67 105mm f/2.4 with a 67-to-645 adapter. Which would be better for you? Both can be used to make fantastic looking portraits, so you're trading off something else (money and some level of convenience / usability) in the choice.
As an aside, there are a number of past threads here on the forum talking about lens performance on the 645D and to a lesser extent on the 645Z; some are quite extensive. Plus there's the lens review section on the site. So one thing you can also do while waiting for others to chime in is read some of what has been written before...