I did use raycasts at first, and they're used for most collision in ATGH, but they were weird and a bit unreliable (sometimes it would be one pixel off in detecting walls, so I had it to make it check if it had entered a wall and undo if so). And to get stuff like "is there something inside this door?" working well, I ended up using a separate method that would check for collision boxes in a rectangular area.
I've since switched over to using said rectangle check method (which uses Physics2D.OverlapAreaAll) for everything. Like I said in my earlier post, you can just set up a Collision Box for an object to define its hitbox, and Physics2D methods can detect those colliders. Making place_free isn't too hard - just make a function that generates the appropriate Rect for what area you're checking exactly (a ground-checking place_free would be a wide, thin Rect underneath the character), then uses OverlapAreaAll to return all Collider2Ds in that Rect, and if there are none, that area is free. That approach can be used to check any individual pixel for colliders if you want.
And I think you can technically make Unity 2D colliders be any shape you want? I haven't done much with that - I have slopes in Loverinth, but I don't actually remember how I made their colliders. I think I was able to write some code that generated the pixel-precise shape I wanted. Which I imagine is sort of what Game Maker does to create precise colliders too.
Nah, checking whether rectangles overlap is super easy; you just have to compare their coordinates. If a rectangle is fully to the left/right or above/below the other rectangle, they're not overlapping - otherwise, they are.
I think if you had a character with a non-rectangular hitbox moving around, you would just have to do a "is the area X pixels ahead free?" check from every "edge" pixel along the relevant side of the collider. That's probably sort of where the idea of raycasts comes from, except Unity's don't seem to work quite pixel-perfectly enough for 2D.