Yes, you simply store data in the cache that accompanies the unit about any abilities it has. Eg you can store the hero ability type as an integer, level as another integer any any other stats as any type you wish. You must purly divise a string system so that it can easilly from a stored hero also load the abilites.
Eg, in your mission, you could call your hero "Justice". You could then store you ability type in the form of an integer as "Justice1" for the first ability and "Justice2" for the second ability and so on. For ability level you could store the integer at "Justice1l" for the first ability, "Justice2l" for the second ability and so on.
By doing this you could then make a sytem where by just the name of the stored unit, you could load all ability data and ability level data.