It sounds odd to me to "take someone" in German.
If you take them along with you (give them a lift / give them a ride), then you say that: "jemanden mitnehmen".
And "den ganzen Weg lang" sounds better to me than just "den ganzen Weg", but I couldn't explain what it is better.
I think you could consider the dative here the dativus commodi vel incommodi (dative of benefit or harm) aka the "benefactive" -- which is also used as an antibenefactive, referring to the person who is affected (positively or negatively) by an action.
Here, the person is negatively affected, but it's the same grammatical idea as "she bought him a shirt" where the dative "him" refers to someone who is positively affected by the verbal action.
why can't it be, Sie nahm ihn allem weg. Why do we need von here?
Because I interpret the English sentence differently.
People can own things, but things cannot usually own people.
So if you take a phone away from a person, you are depriving the person of possession.
But if you take a person away from his phone, you're just moving him to a different place (away from the phone); you're not depriving the phone of possession.
Sie nahm ihn allem weg would be correct if "everything" was the owner of "him" and you are stealing him from the "everything".
I don't think it's wrong. Sounds a bit stilted and old fashioned though. "She took all away from him." sounds better
I think, when you use 'all' in a sentence like you wrote, it sort of implies 'all of something.' 'she took away all his shoes/all his books/all his annoying little habits.' that being said, you also wouldn't typically use 'from him' then, because your additional specific phrase after 'all' includes "his."
it would sound normal to say "she took away all his socks." less normal to say "she took away all his socks from him." the 'from him' being redundant.
you could use your sentence if you added 'it' and moved the words a bit. "She took IT all away from him" is totally fine.
here "she took everything away," while correct by itself, sort of begs additional questions, namely from who/where. so here, the from him explains the rest of the sentence. "she took everything away From Him."
"To take 'something' away" is a set phrase in English. We can break it down into three parts. Part 1: "to take". Part 2: "something"; this is a place holder that can be replaced by anything you like. Part 3: "away", which specifies where the thing from part 2 was taken. So if we say "She took everything from him away", then it sounds like she's taking away a bunch of stuff that was from him. As in, perhaps he gave her a lot of gifts, so that she "had a lot of things from him", and she's getting rid of them now. So she's taking everything from him away. That word order changes the meaning of the sentence.
Yes, it's wrong.
If she took him away, "him" would be the object and would take the accusative case ihn; and "from everything" would require the dative case here, allem.
But we have dative ihm and accusative alles in this sentence, so the thing taken away is "everything" and the "from where" is "from him".
Now I think German is actually more comfortable for me than English. I simply need to say something like "do me(dative) a favor", and that works in many sentences, here "took him everything away". This construction is very close to the first language I speak, and quite handy too.
The speaker's "ihm' and' ihn' sound alike to me. Though how 'ihn' would change the meaning I've no idea. "She took it all away"?
So is there a kind of implied von that would go just before ihm
No. You can't put a von there.
I'd say this is an example of the dativus commodi vel incommodi -- using the dative case to explain for whose benefit or detriment an action is carried out.
"I bought him a book" (ich habe ihm ein Buch gekauft) is an example of the dativus commodi: the purchase was for his benefit = he was positively affected by the action.
sie nahm ihm alles weg is an example of the dativus incommodi: the taking-away was to his detriment = he was negatively affected by the action.
'him' is an indirect object
I wouldn't call it an indirect object, but if it helps you understand this kind of sentence, then fine :)
and 'alles weg' is the direct akkusitive object.
alles is the direct object (in the accusative case). The weg is the separable prefix of (jemandem etwas) wegnehmen "to take (something) away (from someone)".