Hi Mene, Super mechanic here. I noticed that Carguy has opted out. Let me see if I can help you.
The data base that I have is showing that on certain 3.5L engines, the timing cover has to come off to replace the CMP sensor, (and CKP sensor).
Here is a picture of the setup, with the cover removed.
I hope his has shed some light on the matter.
That is how it routes under the timing cover. Here are the steps for R&R timing cover.
REMOVAL&INSTALLATIONRemoval & Installation3.0L & 3.5L Engines