Thanks for the question!
I think I wrote this entire article in a couple of hours, plus some proof reading from my partner, writing the code maybe took up 25% of that time?
These functions are basically muscle memory for me now. By repeating the pattern over and over, I don't need to burn brain cycles remembering the pattern, I only need to think about the particular requirements of the business case being implemented.
This is the value of the practice of Kaizen. Have some exercises you repeat regularly, so you can internalise common patterns. Each time you do it, you will also make little improvements.
Then when it comes time to do it for real, you're not practicing in production on company time.