Even if you could give blocks custom data, I don't think you can target blocks at all. At least, I haven't found a way to cancel pistons without just banning them. If the blocks don't move around, you could create a %default dictionary, or you could use a repeat loop after mining.
If mine -> do...