You may want to try some of the password filling userscripts available. The best support is for pass, but theres userscripts for lastpass and keepass too.
Not necessarily - any language which can read environment variables and write into a file should work. Most existing scripts are using either Python or Bash though.
https://github.com/qutebrowser/qutebrowser/blob/master/misc/...