How to work with Gst.ValueArray?

I am trying to use ScalerCrop property available in libcamerasrc, but it takes Gst.ValueArray of value 4 and struggle to make it work. In python I ended up re-purposing an array that is returned when this property is read, as I failed to create my own; and in C I seem to be receiving capabilities instead :confused:

So, can anybody share a sample how to create, read and modify such array?
The best I found on the internet is this, but it wasn’t enough for me to understand.