How to get the index from an array element?

No, because TArray same as raw C++ array is using memory offset as index, making it unreliable id, if you remove element from array it will move all farther items in memory in direction of removed item. You might consider using TMap which use key to value pairing (TPair) to store items and you can use any type as index, at first it might not make sense to use integer as key type as it will work like TArray, but thing in TMap set index will be persistent or else you will change index of the item yourself

I’m making the targeting system for a turn based RPG and would like to get an element index in integer form, so I could check who’s selected and stuff like that. Is it at all possible, or do I need to create an integer and manage it all the way through?

I’m not sure I follow exactly what your thinking is here, but I have found that using an array of actor object references I am able to set and index to “None” by using “Set Array Element” an connecting the array and index pins and leaving the “item” pin unconnected. You can use the “Find” node to find and Element in an Array and return it’s index. You can use “Get (a copy)” on the array and use an index integer to retrieve the Element at that index. You can then use “Is Valid” to check if it is valid (Not Pending Kill and Not “None”) or you can use the “Find” Node to find the first element that is “None” by not connecting the “Item” pin. It will return the index number of the first index it finds – to “None” ad return that index, or if all indexes are set, it will return a -1 for the integer.

Does this Help?
You could make an Array of Actor Objects and assign the characters/enemies. You could create multiple Arrays (Selected/Targeted/Wounded etc.) and each index in each array would represent each character/enemy. Your other arrays could be booleans, floats or what ever. As long as you do the same operation (Removing, inserting etc.) the same to each array your indexes should match. Or you could create a custom structure variable to put in an array which contains all the data you need and make an array of that structure corresponding to your array of characters/enemies. Hope this makes sense??