Whenever I connect an arduino to power (which has servos connected to it) the servos always go to the 90 degrees position first and then go through the code. Any way to prevent this from happening?

Use the right servo library or define that the last position is used without the reference run to set them into the neutral position.

shahryar.adil.3 (author)  Downunder35m1 month ago

How do I do the second one?

Depends on the library.

There are some solutions posted in the Arduino Playground that do the sweep once and from there the position is kept in the EEPROM.
Keep in mind that when you power the Arduino and servos that they need to know a position, without that the position needs to be established by a sweep.