TGA images are stored on a per row basis. *However* image can be flipped vertically. Its actually an option in the image format. You can encode images both from top to bottom or from bottom to top... And even though most programs seem to output TGA files in bottom to top encoding, your loader should still make sure to support both (just load it in bottom to top order and flip it afterwards if the encoding of the image suggests otherwise). If you also code a function to save images to TGA, it does not matter what order you store the rows in, however, as long as you set the flag properly in your TGA header. Another important factor is that pixels are stored as BGR/BGRA, and not in RGB order, as the standards might seem to suggest.
For RAW images, I don't know, it sorts of depends on you... Sort of like a custom format. Personally, I don't use that format, because it doesnt make much sense to me. Might as well use TGA everywhere and have your image files be sort of self documenting, rather than being restricted to a fixed set of properties for your image files and having the loader sort of guess them.
Implementing support for 24/32 bit TGA is very simple anyhow, you shouldn't have any difficulty. I suggest you find the targa standard on
wotsit.org, as it might help you. The only thing you might find weird is that many program don't seem to support an alpha map on TGA files. I believe photoshop 7 does, however.
Good luck with your project :)