It’s quite possible that peppers which are sun-dried have viable seeds. However, it’s not ideal.
My preferred method of preparing seeds for storage is to cut fully-ripe fresh peppers to extract seeds into a sieve. If the peppers are hot, use thick disposable gloves, at least one on the hand not holding the knife. In the sink, add a little dish soap to the seeds. Away from the sieve, get a thin stream of warm water flowing, maybe half the thickness of a pencil; this is to rinse the seeds and your finger (gloved) later.
Gently mash the seeds around with a fingertip (gloved), scrubbing them with the detergent. After about 20-30 seconds, rinse off the seeds with water and rinse any seeds sticking to your finger into the sieve. Beware, very hot peppers can create an irritating fume as capsaicins are atomized.
Once the seeds have been thoroughly rinsed, let them drain in the sink. Then, put the sieve on a folded paper towel to soak up moisture. After an hour or so, you can spread the seeds out to dry on screen, paper plates, cardboard, etc. Let them dry for a few weeks, in a dark, dry location. They’re now ready to pack and store refrigerated, in airtight jars.
The washing is to help remove some germination inhibitors, sugars and oily resins which can cause seeds to stick together or attract moisture. With very hot pepper seeds, it makes them a bit safer to work with.
If the seeds are particularly valuable, it’s a good idea to make sure the sink’s drain strainer is one of those screen type strainers, and that it’s empty before you begin. That way, if seeds splash out or you drop them, they don’t go down the drain.
Often, if pods are dried, you can just shake out the seeds and pack them. This works OK with drier pods such as Cayenne, Chile Arbol, Pequin, Yatsafusa, etc. Again, this isn’t ideal and might cause irregular germination rates because germination inhibitors may decompose at different rates.
Though this is a guess: one would suspect that germination inhibitors are stronger in thick-walled, moister types of peppers. Otherwise, seeds might sprout inside the pods.