Most of the wiring and hoses are bent and formed to where they will only lay one certain way, and most of the connectors are different, so this makes it much easier when putting it all back together.
But on the stuff I didn't think I could remember where it went, I just took small pieces of masking tape and put one on both sides of the connection, then mark the same number on both pieces. so you just have to match the numbers together.
They sell tape pieces like that with numbers already on it, but I'm a cheapass