What I'm thinking of ultimately doing is not using a gridmap at all, just a script that spawns and erases scene instances, which can easily do so at fixed grid units stored by dictionary of vectors to avoid unneeded loops. I'll likely specify a rule set in the definition of each tile, under the form "if neighbors <1, 0, 0> and <-1, 0, 0> connect whereas <0, 0, 1> and <0, 0, -1> are empty use shape_straight" tested for all 4 possible rotations (0, 90, 180, 270).
One thing I should know how to do in this case is rotate the neighbor check with the desired rotation of that tile, which will save a lot of unneeded definitions. Like if I use the rotation <0, 90, 0> then <1, 0, 0> should become <0, -1, 0> in the check. What's the best way to rotate a position vector and swap axes or flip the sign accordingly?