Am I able to patent something on behalf of a friend through PCT even if I am not a lawyer or patent professional? (I put their name on the form and pay for them etc.)
NO on behalf of others you can not file. But as helping hand you can draft you can add epct but all address and correspondence should be with inventors. it will be not called as on behalf,, in this case ePCT will be of inventor.
you can file patent if you are one of the inventors.
if you are not one of the inventors, but you are a employee of same organization you file application as 'common representative'.
if you want to file patent as representative you need to be either applicant legal entity (IP right are assigned to you), Patent agent of the receiving office (RO).
Am I allowed to file a patent in any country I want to, regardless of where I am living? (If i live in the USA, but want to file a patent in the EU)
You can file patent directly to PCT or any other countries regardless where you live. however keep in mind that where you live that national patent act might have some additional requirement to allow direct patent filing. (to quickly view this requirement please visit http://www.wipo.int/pct/en/texts/nat_sec.html)
If I patent something through PCT, do I have to define from the beginning which national entities I want to file it with?
Yes PCT is international application to provide extended window to various countries, you need to specify countries you are interested. it is recommended to include all countries listed. Keep in mind that few countries are not PCT members you need to file application directly on PCT filing date.
Is there software available to help me write a patent application that I can send to the national offices of the countries I want to file in, without having to hire a lawyer?
Software may give you separate sections or heading but matter and content requires human inputs. Lawyer helps in pinpointing novelty and inventive step which a software might not. Even as inventor you are well versed with your invention but making it big and out of loopholes you should consult lawyer.