This is a nice example of how a misplaced accent mark can radically change the meaning of a sentence. The same sentence with proper punctuation would be:
Como si se pudiera elegir en el amor. Como si no fuera un rayo que te parte los huesos y te deja estaqueado en la mitad del patio.
Which translates to:
As if one could choose in love. As if it weren't a lightning that breaks your bones and leaves you spiked in the middle of the patio.
"It" refers back to "love". "Lightning" is used metaphorically to symbolize the suddenness and violence with which love strikes. "Fuera" is the past subjunctive form of the verb "ser", not the adverb "fuera". "Estaquear" is a verb derived from "estaca" (spike), another metaphor to express (probably)
the feeling of frozennes or lightheadedness such shock usually involves, as if one were literally spiked into the ground. It could also refer to being staken in the heart, as you would do to kill a vampire. It's hard to tell, being the whole sentence a metaphor for love and its aftermath.
EDIT: I stand corrected. Apparently, estaquear is in Argentina and Uruguay a form of torture consisting in tying someone's limbs to four stakes. The metaphor here would be that love tortures you and then leaves you to lick your wounds, I guess.
Why the author used "patio" depends on context. Certainly, being left spiked in the middle of a patio isn't any recognisable idiom. The book this quote comes from ("Rayuela") has different settings (París, Buenos Aires, etc.) and goes back and forth from memories to the present, from descriptions to reflections and ramblings through the author's stream of consciousness. A big chunk of the book takes place in an inner patio1 in Buenos Aires where he spends some time with a friend and his friend's wife, and which their windows face. From what I recall, he falls in love in Paris, not in a patio; but when he writes this he is presumably sitting in his room watching the patio from his window, so it makes sense that this patio came to his mind.
The book abounds with philosophical ideas, double entendres and porteñisms (see resve for revés in the following sentence), so it's hard to tell what Cortázar exactly means by pretty much every single word he uses!
1: "Patio" is actually misleading here. What the author is talking about is an architectonic configuration consisting on several edifices belonging to the same building with their inner faces forming an interior space, such as this, this, this, or this.