How to deal with different actions for different states of the environment?
There are so many reinforcement learning algorithms. I recommend you this articles:


Introduction to Various Reinforcement Learning Algorithms. Part
1
Introduction to Various Reinforcement Learning Algorithms.    Part
2


There are several approaches. A NN can get state and action as an input  and expected discounted reward as an output. But you can just not pick an action if this action isn't available and there isn't necessity to give it negative or zero reward just don't learn your net to change it behavior for these actions because they are neither good nor bad.