I was wondering if anyone has already written a working Docker script to easily pull all necessary dependencies and build GrapheneOS?

I want to apply some patches and change some build options for testing (nothing kernel related, so shouldn't need to do a kernel build).

I'm afraid that relatively few developers frequent this forum. I would recommend asking instead in the GrapheneOS chatroom for development, it's available on Discord, Matrix and Telegram: https://grapheneos.org/contact#community-chat. You're more likely to receive a more informative answer there.