Working and editing For Loop how to delete certain elements by their index

Hello. I have such a task, I need to create an island having a grid of hexagons, I successfully implemented the grid itself through For Loop, but it turns out to be square, I wanted to clarify how can I edit it? by means of removing unnecessary elements to give the desired shape? is it possible to make some kind of zone whose size and shape can be customized, which can be used in such a way that everything that goes beyond this zone is automatically deleted? the problem is also that I need to use an Instanced Mesh