Hi Masyaka,
we have the researchstation on our server modded, to do something similar what you wanted. Turrets drop with normal stats, with the default generation, but if you put them into an research-station, a rarity-factor (commom = 1 to legendary = 6) is applied. Currently all turret DPS and turret size are multiplied by the rarity.
For example: If you research five white turrets (rarityfactor 1) into one green turret (rarityfactor 2), a default green turret would be generated with doubled DPS. Green to blue would generate a default blue one with DPS*3 and so on.
We also changed the research results for some turret types:
Mining / Salvaging Lasers:
Range: 0.75 km to 1.5 km multiplied by rarityfactor (Legendary 4.5 km to 9 km)
Eff: not entirely sure about the values, but legendary can roll up to 100%
Rocket Launchers:
Now have an 75% chance to roll with "Guided Missiles"
Rocketspeed is currently fixed to 2000m/s
Firerate is equal to the rarity-factor, so 1 shot/s to 6 shot/s
Balancing is currently a bit off, but due to the increasing turretsize (common 1x1 to legendary 6x6) bigger ships are needed to fit the turrets. Also all turrets from the researchstation currently have independent targeting, but I plan to change that to an 50% chance.
The nice thing is, that you only need to change the server, not the client and it's still working.
I would open a thread in the modding section, if you are interested.