At the high-end of mathematics, this kind of problem is studied in the branch of "sub-Riemannian Geometry" which is kind-of-like Riemannian Geometry, but weirdly different.
However, your question seems much more basic: you first need to understand the concept of spaces in more than 3 dimensions, and then to understand the concept of of (smooth) manifolds, and then some basic concepts relating boundaries to the interiors they enclose. This leads naturally to "calculus on manifolds", which gives explicit formulas that relate volume, area, perimeter in various general settings. Its also possible to do all this in 3 or fewer dimensions, but the general n-dimensional case really is not any harder; even easier, in a way.
Almost all "sets" do not even have a boundary -- a general set might be like a sprinkling of sand, maybe with some sharp pointy bits going off to infinity, other parts shaped like nasty fractals or worse - sets in general aren't even "measurable".
I suspect you'll get bored trying to read the standard college-level pre-requisites for this ("multivariate calculus" and "linear algebra"), so you might instead enjoy picking through nearby topics, such as "set theory", "general topology", "measure theory". The danger is you'll get stuck on advanced topics with a very weak basic grounding, though. The basic grounding is super-important to have, although learning it can be boring (depending on the text).