I think the most popular way to do it is to put the changes in a buffer and turn on a flag that signalize that there are BG updates to be done next NMI. In the NMI handler you need to have some code that updates the nametable according to the contents in the buffer if the flag is set, and then clear the flag again. This
wiki page explains it. This way you can update the buffer at anytime since the actual update won't happen until the next NMI anyway.
You can have one buffer for BG, one for palette and so on, and a flag for them each in the NMI.