Searching in irregular shapes

I would like to have a system that would allow me to search a area for Gameobjects. Kind of like Physics.OverLapSphere. But I would like it to have the following features.

  1. Allow for more shapes. e.g. Capsules, sphere, boxes,cylinders, ect,

  2. Be able to use a vector for a size so that it could have a custom height, width, and depth.

  3. Be able to find distance from center(while taking in the shape and size of the search area)

What would be the best way to accomplish this?

this may sound strannge but you could have a group of box collider in that particular shape with a common parent and instanciate it in where it need and then scan all the collision detection
but this may give you some bugs since some collider may overlap

or maybe make an invisible mesh of the needed shape with as few triangle as possible and use a mesh collider.
this wya you are sure to have 1 collision trigger for every object in that zone

i think it would be good/average on the performance side if you compare with hand made zone scanner that you could make