These are all very interesting possibilities. Ultimately it could be even more basic that all that though, in so much as all that really needed to happen was 2 intelligent beings of telepathic natures became symbiotic, one of which was capable of shape shifting into forms useful to the other, in exchange for having a living purpose & connection with them.
No, it was genetic redesign and synthetic parts. Honestly, they were a lot bigger than elephants. I envisioned them as whale-like (naturally).
Is it really all that different than the situation Kevin Uxbridge had with Rishon? He was an ultimately very different being from her, but was able to manipulate an environment for specifically her, that fit to her needs, being that he was after all, somewhat telepathic, as evidenced by his musical torment of Troi. In a most basic sense, it could be as simple as Gomtuu is situationally the same as Kevin Uxbridge, & Tam Elbrun is its Rishon, but before that, it had that kind of relationship with many Rishons, as did others of its kind, albeit, it had less ability to be anything else by the time Tam Elbrun came along, as evolution had led its kind to a permanent state
Interesting idea, but not what we had in mind at the time.
Shape-shifters have always kind of bugged me...but then, so does telepathy and I've used it a lot. They're both pretty much just magic.*
*In stories. There's no such thing IRL.