Blocks by themselves are not able to hold very much information. The only way to set custom data on a block such as additional booleans would be to use a tile entity however that is not a resource friendly way of storing the data. The best way to do this would be to create a form of database that would allow you to temporarily store information on protected areas. This database could store simple info such as the position of block A and Block B. These two vectors could be used to create a rectangular prism of blocks that would be protected. Then you would need to simply compare a block against those within the database.