A while back, someone posted a link to a JP website that had the AI scripts for each enemy in the game. Can't find the link, so I re-upped the archive here:
https://mega.nz/#!FGwCzA7I!oE5sYXmEqdPUDXhDHhT7Y8fqlqFJ5bf8kZIOipSH72oIt has data on each targetadv as well as the unknowns in Ifrit's AI editor, so it may help you figure it out. For example, the targetadv in the second Seifer battle selects for the character with the lowest Fire resistance.
edit: Comparing Ifrit to the txt files and it seems that arg2 is indeed the target.
200 - enemy (a player character)
201 - ally (another enemy)
It seems they can also choose to target a specific type of enemy; for instance, Elite Soldiers can specifically target G-Soldiers (enemy 87).
On the subject of enemies targeting specific enemies, I looked through enemy AI and came up with this list:
0 = Squall*
1 = Zell*
2 = Irvine*
3 = Quistis*
4 = Rinoa*
5 = Selphie*
6 = Seifer*
7 = Edea*
8 = Laguna*
9 = Kiros
10 = Ward
17 = GIM52A
23 = SAM08G
55 = Lefty
56 = Righty
87 = G-Soldier
88 = Elite Soldier
111 = Granaldo
112 = Raldo
124 = Paratrooper
143 = Ultimecia (Draw Point)
*Not actually referred to as such in Ifrit's AI editor, but Kiros and Ward follow the character order used elsewhere, so I assume these numbers are right.
Starting from 17 (or 16, counting Dummy?), the enemy order follows the order of the com files. So 18 is Blobra, 19 is Thrustaevis, etc. I don't know what 11-15 are used for.
A 3 in arg3 seems to be checking to see if a condition doesn't apply, such as not having a status effect.
Edit 3/3/19: I had the idea to compare the arg4 list I made earlier in this thread to the list of text strings for status effects and found that they more or less match up. Did some testing with the enemy AI to make sure these were accurate. Updated list (new entries marked with *):
arg4:
0 = KO
1 = Poison
2 = Petrify*
3 = Blind
4 = Silence
5 = Berserk
6 = Zombie
8 = HP is < 1/4
9 = HP is < 1/2
16 = Sleep
17 = Haste*
18 = Slow*
19 = Stop
20 = Regen*
21 = Protect
22 = Shell
23 = Reflect
24 = Aura
25 = Curse*
26 = Doom
27 = Invincible*
28 = Petrifying*
29 = Float*
30 = Confusion
33 = Double*
34 = Triple*
35 = Defend*
36 = Physical attack ineffective (all physical attacks do 0 damage)
37 = Magic attack ineffective (magic attacks miss)
38 = Charged*
39 = Back Attack*
40 = Vit0
41 = Angel Wing*
42 =
43 =
44 =
45 =
46 = Has Magic
47 = Summoning
200 = Male
201 = Female
202 = ? (Crashed the game)
203 = Highest HP
204 = lowest HP
205 = Highest Strength
206 = Highest Defense
207 = Highest Magic
208 = Highest Spirit
209 = Highest Speed
210 = Highest Luck
211 = Highest Evade
212 = Highest Hit
213 = Lowest Strength
214 = Lowest Vitality
215 = Lowest Magic
216 = Lowest Spirit
217 = Lowest Speed
218 = Lowest Luck
219 = Lowest Evade
220 = Lowest Hit
221-228 = Highest [Fire, Ice, Thunder, Earth, Poison, Wind, Water, Holy] resistance
229-236 = Lowest [Fire, Ice, Thunder, Earth, Poison, Wind, Water, Holy] resistance
237-238 = ? (Crashed the game)
Interestingly, the strings for the two blank spots after Defend say "physical attack ineffective" and "magic ineffective". These match up with the two blank status effect spaces after Defend, so perhaps they planned these two statuses before scrapping them? Then again, other strings are filled with things that seem totally irrelevant, so they could be used elsewhere.