[SOLVED] How do you individually rotate objects in a grid?

Thanks for your suggestion Jeremy! I was familiar with how transformations regarding rotation in Processing work. The issue here is that I have only since recently started to make sketches which can be considered ‘somewhat’ more complex than the absolute basics.
I realised that what I wanted to do in this sketch should be possible using rotation transformations, I only couldn’t figure out how to do it exactly – specifically where and how to implement the code. It’s something I’m still struggling with, and have to keep practising.