Mechanically adaptive materials for intracortical implants