Why not in the middle of the freeway? Sacrifice 2-3 lanes or do it raised, one for freight another for metro. Last mile transportation still needs to be solved, light rail would be awesome to and you and down main streets.
That is not trivial at all. How do you go against status quo which is to add more lanes for cars? How do you get the train from the middle of the freeway or raised portion to outside/ground level? Where do you put railyards to break/make trains to deliver to/from local places? I'm all for freight trains, but there is no way they can simply piggyback on car infrastructure.