It appears that you have some apps on your iPhone that were purchased with your friends iTunes account. You must be signed into the account that purchased app in order to update apps. The only way that I know around this is to restore your phone as " NEW" and start over again.
You don't have an option unless you delete the apps downloaded under your friends account, and then re-download them under your account. You will not be able to update them unless you are signed into his account. It's a pain to sign in and out of accounts. You said most of them were free so i don't understand why you won't delete them and re-download them. If you really have that many, do a few at a time.
If you feel better typing on a full-size keyboard, then read on...
Delete the offending apps on your iPhone (those you got using your friend's ID), writing down the names of the apps. Then sign in with your own ID on your phone and on your desktop on iTunes. On your phone, go to Settings>Store>Automatic Downloads, and set Apps to On if it isn't already.
Search for the apps, one by one, on iTunes on your computer. Click on "FREE" for each app. The app will download to your computer and automatically to the iPhone as well.