Design and fabrication of flexible structures and electronics