Store site field data in separate file

I have one structure field in my site.yml. I want to store this field data in different file . not in site.txt. Is there any way to do it

Where would you want to store this data and why?

I want to store my enviornment variables. i dont want to store this enviornment variables data in my project (plainkit-master) folder. consider if project is in D:/Projects/plainkit-master and i want to store my data anywhere like in c:/env/datafile or d:/abc/xyz/dataFile

Maybe you can get an idea how to go about this from this plugin: Trevor | Kirby CMS

You basically create a separate view and then store the data wherever you want.