3D electronic and photonic structures as active biological interfaces