Buttons and levers can be placed without connections, and the solution to the puzzle can include the script to add the appropriate connections to whatever is supposed to be activated by the switch.
** But I would say that this is a bad idea. Better to design the puzzle in such a way that the player simply cannot access the switch until they solve the puzzle; it would not be warmly received should the player be able to access the switch, and realize that it's non-functional until they find the "right" solution; when some would view their own quick access to the switch as a valid solution itself.