Basically just getting a mast that is close to your wood mast height, gooseneck location, boom length etc. Other considerations:
Winches on mast?
No of halyards
Pin size of the rigging
you have to match the new mast tang pin size.
Mast crossection... not that much of a science really... they only make so many extrusion sizes. If the extruded mast you get came off a boat in your size/displacement range you are likely good to go.
If your old boat is a masthead rig (not fractional rig) get a mast that is also like yours. and vice versa.
Spreader location can vary quite a bit.... :guessing +/- 1-2 ft.
Spreader length should probably be close to same or longer.
Mast base. You need one to match your new mast.
stepped? You need to make sure the hole in your boat will allow your new mast through!
You will need to rechock the mast into the hole in your cabin
Maybe some others will improve the list.....