Assigning AI a player controller

I want to make an RTS game in a classic sense of player and AI. There can be 8 players in total on a map and any of them can be chosen as AI. The controller class has many functions that the AI player would also need to use. My question is how can I get a separate controller object assigned to player AI and how do I index all these players and AIs.

Or is there a better way to handle this situation?