Why are key signatures arranged in a circle like it is today, why not a triangle... or a square? Who came up with the idea to arrange the key signatures in a circle?
You are presumably referring to the Circle of Fifths.
Nikolay Diletsky originated the idea in his Grammar of Musical Singing. He came up with several designs, which I have included below.
There is only one convincing alternative to a circle. Twelve keys are to be represented, any of which might dominate a composition and serve as a reference point. Therefore if a polygon were used, a dodecagon would be the natural choice.
Arranging the keys around a triangle or a square makes no sense. Some keys would be placed closer to the vertices than others, which might imply (wrongly) that they were more important. Similarly, keys grouped on the same side might be inferred (wrongly) to belong together more closely than to their neighbours.
Here are the relevant pages from Diletsky's book:
The 'circle of 5ths' is one way of displaying the result of adding sharps (or flats) to a key signature. It demonstrates that adding a flat is equivalent to removing a sharp, and vice versa. It demonstrated that (in equal temperament tuning at any rate) if you go on adding sharps, and go through the enharmonic shift that recognises F# is the same note as Gb, you eventually get back where you started.
The 'circle of 5ths' diagram makes a pretty picture. Because of this it appears in every theory textbook, and we maybe over-estimate its importance!