I have a train that arrives at Coimbatore at 3AM, and need to get to Mettupalayam by 7AM. What is the best way to get there? I assume trains don't run that early, or at least I haven't been able to find any on ixigo, makemytrip etc.
Coimbatore is just 45km away from Mettupalayam; just less than an hour journey if you catch a taxi. There are also a lot of buses available from Coimbatore to Mettupalaym. The buses will take one and half an hour at most. Bus services start at 5:00 am in the morning. So, you can take either a cab or a bus as per your convenience.
In addition to the comment above: there are buses from the Coimbatore railway station to the main bus stand in Coimbatore, from where there are lots of buses to Mettupalayam. There is also the Nilgiri Express, daily from Chennai to Mettupalayam: this train typically gets to Mettupalayam by 7, in time to get the hill train up to Ooty (if you intend to take that train).
Anecdotally, I've often found the hill train waits for the Nilgiri express to arrive before it leaves, because there are so many people who transfer from one to the other.