#1 is, how do you change the battle objective in story and randoms? The second is, how do you make the AI have mastered units?
In order to have the AI have mastered units, in ENTD, where you choose their ability list, instead of "FF <Job's>", you choose the skillset their class belongs to, this will give them all attacks learn-ed.
What do I do for their secondary?
If you give them a random secondary, it won't necessarily be mastered. If you choose it for them, it will.
Someone more experienced than I in ENTD editing could probably give you a descriptive way to give them viable skillets without the above trick.
#1: Battle objectives are controlled by Attack.out, a section I call Battle Event Instructions. However the length of each instruction is set or at least has a maximum so that limits what can be done. Check out the thread about it in the Hacking Section.
Nope I choose the secondary for them, and they still usually only have one ability learned. I know this because I accidentally put one of the enemies on my team.