I was listening to the witness's story from behind without paying much attention when, all of sudden, I realised that it contained an important piece of information for solving the case.
(d).
どこからともなくいい匂いが漂ってきた。
(I couldn't tell from where, but) a good smell wafted from somewhere.
(e).
「やっと終わった」。彼は誰にともなくつぶやいた。
Finally, it's over, he muttered (literally: muttered to no one in particular).
(f).
二人はどちらからともなく顔を見合わせて微笑んだ。
The two smiled at each other almost at the same time. (literally: I cannot tell which one did it first, but the two looked at each other and smiled.)