Hmm... I found a lot of resources (though most of them are 2d) on similar topics.
Here are some I found:
https://kidscancode.org/godot_recipes/2d/grid_movement/
Along with some similar questions as well.
https://godotengine.org/qa/71825/grid-based-movement-limit-display-potential-move-distance?show=71825#q71825
https://godotengine.org/qa/99354/grid-based-movement?show=99354#q99354
https://godotengine.org/qa/65646/how-do-i-add-grid-based-movement-to-a-isometric-tilemap?show=65646#q65646
https://godotengine.org/qa/70995/pls-help-grid-movement-demo-movement-interpolation?show=70995#q70995
How I would go about doing it would be to create a dictionary. Please do not, however, that I know near-to-nothing about 3D, so I apologize if these techniques do not transfer properly.
Here's a tutorial on dictionaries, in case you don't know: https://docs.godotengine.org/en/stable/classes/class_dictionary.html
If you need more help on dictionaries, search up python dictionaries, they're literally the same thing in gdscript.
So what I would do is this: (remember to add proper indents!)
var grid = {
a1 = position3d(1, 1, 1)
a2 = position3d(2, 2, 2)
}
please note that position3d is probably not a real function
And so on.
If you're looking for a more of an infinite grid-based system, you could just move everytime by a set amount.
translateright(40)
translateleft(40)
translateup(40)
translatedown(40)
disclaimer: functions above are probably not real functions. Just used as placeholders :D
Other than that, I have no idea how to do this. Please do note that this is just a suggestion for you to use, and I am terribly sorry if my suggestions do not work. Hope your problem works out :).