THey did things like mould pockets in the CFRP frame to accommodate wiring harnesses so it didn't require clamps and extra fasteners. Anyway, adding a motor and sensor, while possible, won't be particularly easy or cheap. It's one thing to add a feature that was an option, but not present, it's another to engineer a solution to an existing vehicle that wasn't.
2011 535i x-drive GT, 2014 i3 BEV
Soon (hopefully!) A 2021 X5 45e will replace the above