This is a fairly large list of requirements and unless I am missing something m,ay be fairly complex to implement. I will try to address as many of the pieces as I can here.
First assigning a specific member to a snatpool should be pretty straight forward. The command do this is "snatpool [member ". So an example would be "snatpool mysnatpool member 10.1.2.3". In reality you will probably use a variable for the member so
"snatpool mysnatpool member $some_variable"
Now the harder part is how are you going to assign the variable. You could create a class containing all of the IPs that are in the snat pool and loop through it using next element. This would take care of getting the list of members but next you would need a way to keep track of them so I am thinking you would need to use the table command.
So the flow would be check an incoming request to see if it has and existing snat assigned, if it doesn't you would loop through the class file checking each element against the table until you find a snat member that is not in use.
I am not certain exactly how efficient this would be but I think you could make it work. I am sure others will chime in with there thoughts. It is also entirely possible that I am over complicating this a bit.