Removing a part of a block

image
I would like to achieve the image above without unions, but instead splitting the block into smaller pieces to fit the removed Part.

is this possible?

Black Part = Removed

If you think of the blue cube as a grid of cubs. you can check what’s next to the black block and split the blue block accordingly