Create irregularly shaped gaps in cube
OK, I'm still not sure what you need exactly, how it differs from what you already got or why yours is not satisfactory, but here is what I came up with.



Just add a simple cube to your scene, and a small Metaball. Adjust the Meta Ball size as desired, but make sure you apply the scale and adjust precision correspondingly afterwards.

Now add a particle system set to Volume to the Cube object, and under Render as particle object add to it the Metaball. Adjust the number of particles as necessary. A high number is expected, and so is the corresponding slowness and unresponsiveness, just give it a little.

Make the particle system emitter invisible (make the cube draw as Wire only so you can see what you are doing too), and tick Unborn and Died, also turn off physics.

Once happy with the settings select the original metaball (not the cube or particle system) and convert it to a mesh. Manually erase the stray original metaball, then you can add a Boolean modifier to it, and intersect with the original cube mesh.



To keep distinct materials at the intersection faces just add a second material slot to the object with the Boolean modifier before applying it.