Separate class and Monobehaviour? Instance a new one?

I have a class such as:

class ItemInfo extends MonoBehaviour {
var a : int;
var b : int;
...
}

It also has several functions inside that I am using to query a database and return information back.

My question is… To simplify my coding, I would like to be able to make prefab that includes the script with all the functions, but be able to create new instances via script var t = new ItemInfo(); outside of this script to make better use of modular design.

So in summary: How do I make a class both extended from monobehaviour and also able to create a new instance via code? Thank you.

Use gameObject.AddComponent(ItemInfo) to create a new instance on any game object you want. Or create a new game object for it with new GameObject(“Name”).