I don't see a use for an array here, there are better options for this in FileMaker.
For adding a control that users can click to select a portal row, you can define a field in your portal's table and format it with a single value custom value list. (The value can be the word "selected" or just the number 1). Then format the field as a check box via the Inspector's data tab.
That approach is simple to set up, but if you have multiple users accessing your database at the same time, each user's selections will be visible to all other users and may interfere with the selects another user may make at the same time. So let me know if this will be a hosted solution and I'll describe a scripted method that builds a list of selected records by ID such that each user's list is kept separate from other users.
PS. when using 1 as the single check box value, developers normally resize the field so that the 1 is not visible. They may add label text next to the check box or just have an unlabeled checkbox.
That's not a bad solution, Phil: I've resized checkboxes like that for other applications. I was hoping to avoid using a field-based solution just because of the problem of junk-data... I presume you would build into the end of any scripts using the "Selected" field a scrap of script that deletes the "1" value so the script would not return false finds later?
The file isn't currently hosted, but I would like it to be eventually, so any solution that favors multiple users would be preferred.
Replace Field Contents can be used to clear the fields so that the user's selections do not persist.
To see an example of how clicking a control can build/edit a list of values see this fairly old demo file. It uses a calculation field to show which values in a portal are selected, but a conditional format can be used instead to make layout text (such as a tick mark) appear/disappear instead.
If the lists built by clicking a control in the row of records (doesn't have to be in a portal like the demo), are stored in either a global variable or a global field, the values for each user will be kept separate from each other.