If i was botting on an alt account but i had my main account pulled up at the same time not botting on it could i still get banned on my main account?
Probably not, but it will cause Blizzard to look into your main account. Sharing gold / mats could lead to the ban.
They can ban every Account from that IP Adress. Especially if you are involved in gold selling. Some people report here that their brand new never botted accounts got banned just becuase they were using the same IP.
Blizzard has the ability (legal status controversial) to log MAC address and other hardware details (such as hard drive serial) and they have the option to use these when investigating banning a gold selling account. I have personally had accounts linked in this way (non-botted account banned with botted account due to same computer/IP) however most of my bans specifically target the individual account in question. Pro-tip: If it happens, claim ignorance/shared computer/college dorm/internet cafe. All of these have worked in the past.