You either create a singleton and an array of collision tile id’s and check it with array.has(val), which is what most games do, or you create two separate TileMaps, one for collision, the other for non-collision. Then it’s pretty simple, just spawn monsters on tiles with id -1 on the collision TileMap.
Godot have a constant for invalid cell in TileMaps.
INVALID_CELL = -1 — Returned when a cell doesn’t exist.