Body-integrated self-powered system for wearable and implantable applications