Tempdb Configuration best practices
X files, with X being the number of processors up to a limit (8, 16 or so).
Preallocate size.
Always on separate volume because I really like the ability to check the IO load on that one. Tempdb overload happens rarely, but if it happens.... it is good to be able to set an alarm.


Regarding drives: if you CAN keep them on the same drive, you either have a very small database (in which case - get it on an M.2 / U.2 SSD with enough IOPS) or have a problem to start with - of the drive is "fake" (like a SAN delivering a LUN that in reality has a lot behind) I keep all my volumes these days on shared storage, and at the moment even on realtively slow HDD (7200 RPM), but it is backed by at the moment 6.4 TB of M.2 SSD which will even grow larger, so my read access time is pretty much guaranteed below one millisecond. Even with all ending up on the same discs, I really want separate volumes to check contention with one look.

Same with mdf and ldf - all on their own volume.