Write a script to change plugin settings across an entire network

I've been wondering about this for a little while now. There are times when I need to make the same change to a plugin across an entire network - previously I've been going through each site an changing the settings individually, but this is getting a bit long winded as my network grows.

An example is as follows. I use Visual composer on my network, often, when I update the plugin, new elements are added to VC. With new elements, you have to manually activate them on each individual site. I'd rather learn how to write a script that will change these settings across my entire network.

Is something like this possible to do?