Draggable.gd using TouchScreenButton here but would be very similar for other buttons
dragging and dropping
if event is InputEventScreenDrag and is_pressed():
position += event.realtive
For the connecting part you would have to define a bezier curve, which you tessellate everytime the points of it change. You can then manipulate the points and handles of the curve via script. You can find information about thart part by googling.
Hope it helps.