What is the most efficient way to invert a mesh so as to inform a key, coupler or mold?
To better explain what I said above in comments, here is an example.

Starting from a "positive" cube object, this below is a possible setup to use a boolean:



after applying the boolean modifier, you get a cube.002 like this:



Note, to make the boolean work as "difference" I had to scale up a bit the second cube: you may need to rework a bit the resulting shape to get a perfect "shape inversion" as in your image above.

Lastly, in this simple cube topology works very well:



but using more complex meshes, and less simple booleans, you'll get bad topology quite soon... if that matters to you, take into account to get the overall shape from booleans, and then spend some time to fix it, by retopologize.  Sometimes is simple, sometimes is so bad that is better to avoid booleans and choose another approach (manual modeling).

See this case: How can I make holes on a wrist strap?, where booleans had to be avoided, while in the above link (Partial shape subtracting only) due to very complex shapes it could work well (but it probably reuired using high density meshes)