Electrochemically patterning sol-gel structures on conducting and insulating surfaces