I don’t know about the usefulness of such a feature.
In my opinion, sidebearings are not a static value; rather, they are linked to the amount of whitespace created within a glyph and thus must be flexible. Editing a glyph, you also edit the counter shape, and must account for its changes in the sidebearings.
Regardless, you can achieve the behavior described with a Python script; look into the Robofab ‘marginPen’ module.

