Interesting idea, I currently only own a PK/A adapter but here's my 2 cents:
Referring to the pic below and these two sites
1 2
The PK/A adapter only has three switchable pins where Pentax uses six(+) and pin * is used to indicate 'P' (AE) mode leaving only two switchable pins to change the indicated aperture range of the lens.
1 on the pic below is an insulated spot on the flange which permanently indicates a '0', the locations where 3 and 4 would be permanently indicate '1's.
So the only aperture ranges available are:
123 45
001 10 4.0-22
001 11 3.5-22
011 10 2.8-22
011 11 2.5-22
These are selected by the position of lever "A" in the pic below moving contacts on the small circuit board in the adapter. This would be quite difficult to make so I would suggest making four adapters (one for each range) by drilling dimples at the positions where you want a '0' and filling the dimples with epoxy (as per 1 on the pic below). (You could also make other adapters with different aperture ranges that the adaptall adapters can't do)
Next the '*' position, this is electrically connected to the mount body when the lens aperture setting is in the AE (P) position and is switched by the movement of the 'P' lever in the pic below. I don't have an answer for this yet, I don't have a 'K' adapter to examine.
Hope this helped.