I have a content area Property with a Custom Attribute called AllowedTypes which restricts BlockData in this Content area.
I want to find this attribute from code and apply Blockdata based on the allowed type.
Your question is not clearly explaining your intent...Can't you remove the BlockData Directly from that AllowedType attribute? If not, then please explain your situation in more details.
I am not sure about this but you can try this-