Some result as you say, is a theorem $t_m$ involving instances of some structure $m$. You'll find a more general result exactly then when you consider a more general structre $M$ and construct a theorem $T_M$ for which $T_m=t_m$.
E.g. you might consider as $m$ the polinomial $x^4$ and you find a theorem $t_m$ given by
$$\frac{\text d}{\text dx}x^4=4x^3.$$
The more general expression $M$ given by $x^n$ with $n\in\mathbb{N}$ fullfills a $T_M$ given by
$$\frac{\text d}{\text dx}x^n=nx^{n-1}.$$
As the last result $T_M$ is valid for all $n$, a less general theorem $T_m$ for $m$ is implied as well. Of course, I have constructed this example in a way in which $T_m$ exactly yields the previous $t_s$.
Now how did I go from $m$ to $M$? Here I abstracted the instance $4$ by a more general object for which I decided the "taking power of x"-process would be sensible too. I understand $4$ to be of type $\mathbb{N}$. For formal proof of any of the theorems $t,T$, I will need some syntax and proves of deduction.
I think the answer to your question "how to come up with the generalisation (of the structure)?" might just be "out of need for a specific problem of interest". And the answer to "how to actually find the structure which generalizes another" might be that one will have to abstract the syntactic rules governing the math you dealt earlies so it fits your new problem.
I tried to sneak in some ideas of model theory in here, but I'm really a physicist and the first example coming to mind when reading your question what the quest of generalizing the theory of electrodynamics to fit in nuclear force phenomena. In a question over many many decades, people eventually reformulated the former to be a gauge field theory with $U(1)$ symmetry group and its generalization to bigger groups $SU(n)$, Yang-Mills theory, now governs the Standard model of particle physics. The insights to consider fairly abstract group structures and their matrix representations was motivated by the observation of the structural similarities found in the particle zoo of the $70's$ and then people tried and tried. I guess I must formulate it as: They ended up with a theory which didn't not work. My conclusion is that there is no general abstraction algorithm, which and generates new theories (which yields valuable results) in finite time :)