Hi,
Assuming you have some int value in your GDScript and you want to export it as a bit mask you can do it like:
# Set any of the given flags from the editor.
export(int, FLAGS, "Fire", "Water", "Earth", "Wind") var spell_elements = 0
That is actually example from GDScript documentation, however as I remember editor doesn't show it exactly the same as collision_mask, but as a list of checkboxes (maybe unless there is too many flags? I don't know).
Is that what you need?