In terms of timing, flavorings can be added a lot like dry hopping. You want to add them after the bulk of fermentation has already occurred so usually 2-3 days or even a week after pitching the yeast. There are a couple reasons for this. For one, the wort will already have some alcohol in it which means you are less likely to get an infection when you add your flavoring. Also, vigorous fermentation can blow off the volatile oils that give things like vanilla or hops their flavor, so you want to add additives later on when the beer is already pretty stable.
In terms of quantities, I haven't played with anything other than hops too much, just a little citrus juice into one beer. Generally 1-3 oz. of dry hops is not unheard of so that amount might be a good starting point for things like basil. One option is to split up the beer into some smaller (1 gallon?) containers and try different amounts or flavorings in each of them. Play around, get creative, you are unlikely to mess it up too much and it might turn out really good! Good luck with everything.