Fix namespaced enums and add ref op to array