Doing what you suggest would be an inplace op that pytorch can’t differentiate, but I suppose you want to do it anyway.
The naive solution would be to slice and dice, then put everything back together again. Something like this, which I think should be pretty performant.
bits1 = A[:,:,:3]   # hopefully pytorch just creates a new view onto 
bits2 = A[:,:,3:19] # the same data in memory
bits3 = A[:,:,19:]
bits21 = bits2[:,:,:,:3]
bits22 = bits2[:,:,:,3:35] + B
bits23 = bits2[:,:,:,35:]

bits2 = torch.cat((bits21, bits22, bits23), dim=3)
C = torch.cat((bits1, bits2, bits3), dim=2)