Creating an irregular virtual area in the workspace

Hello,

I am creating a game in which a ball has to get destroyed when it enters a specific irregular virtual area in the workspace (not necessarily on ground).

I am having trouble creating such an area.
An array with all the points in that area would suffice for my purpose.

Can someone guide me on how to create such an area and get the coordinates of all the points in that area inside an array?

Thank you very much.

Create a premade 3D object of the shape you want.
Remove the mosh and render component.
Set the Collider as a Trigger.
Create a new Script called DestroyArea. Add this function to the script:

void OnTriggerEnter(Collider other){
	if (other.tag == "Player")
		Destroy(other.gameObject);
}