How about sth like this:
concatenatted_tensor = torch.cat((a, b, c), dim=1)

This will result in a tensor of shape torch.Size([5, 115]). After computing f on this tensor, just do
a_new = concatenatted_tensor[:, :35]
b_new = concatenatted_tensor[:, 35:105]
c_new = concatentatted_tensor[:, 105:]