Here there arise a whole host of connections to other Greek words and it is not clear what came first, but all of these English words are related:
"a combining form with the general sense “first, principal,” that is prefixed to nouns denoting things that are earliest, most basic, or bottommost (archiblast; archiphoneme; architrave); or denoting individuals who direct or have authority over others of their class, usually named by the base noun (archimandrite; architect)."and the prefix arch- as
"a combining form that represents the outcome of ARCHI- in words borrowed through Latin from Greek in the Old English period; it subsequently became a productive form added to nouns of any origin, which thus denote individuals or institutions directing or having authority over others of their class (archbishop; archdiocese; archpriest). More recently, arch-1 has developed the senses “principal” (archenemy; archrival) or “prototypical” and thus exemplary or extreme (archconservative); nouns so formed are almost always pejorative."Makes sense! But how does architect fit into all this? It comes from the Greek architéktōn, which can be split into archi-, with the meaning described above, and téktōn, meaning "builder" or "craftsman". Therefore the architect is the "principal builder".