They can be mixed off traffic is rather low and the path is wide enough (basically plan for the encounter of a pram in one direction with a cyclist with trailer in the other direction). But that typically doesn't work for sidewalks in many cases because they're either too narrow or have too much foot or bike traffic.
E-bikes and cargo bikes are also a lot heavier than other bicycles and are getting more common. Due to higher mass and being powered they're quite a bit more dangerous to pedestrians.