For the first:
here's the entity guide page for the entity you'll use.
For a button that's only useable by a NPC, a trick is used where the button itself doesn't do anything (alternatively play a "no access" sound or sentence).
Instead a
scripted_sequence is used. In a very basic setup, it uses the Search Radius key (value of roughly 100 units or so, depending on how far/near the monster needs to be before starting the sequence) and Target Monster set to the classname of the NPC you want to use (for example monster_scientist) and Move to Position set to Walk and Action Animation set to the sequence you want it to play (such as
retina
for monster_scientist).
Then you'll want the scripted_sequence's target to be whatever you want to be triggered when successfully unlocked by the NPC.
Of course it can be made more complicated by chaining multiple scripted_sequences or having the target of the unlocking sequence be a
multi_manager that controls a chain of events to take place.