I tried it out and "Hacking Attempt!" does appear when I try to use an array to store the values.
If there's no way to prevent it, you can always create a checkbox for each adoptables. Then do a cycle (after submitting) to verify which checkboxes were checked and had PetID values on them then push those values to an array and well, do your group thing.
Like:
PHP Code:
//for each pet, add a checkbox
$checkbox = new CheckBox("name", "Postname{$index}", value)
{$index}++ //doing this, for each pet you'll have Postname1, Postname2, Postname3 etc.. value can be pet ID?
//after submitting/post
for($index = 0; $index < numPets; $index++)
{
if($mysidia->input->post("Postname{$index}") != NULL) //value not null means ID was stored/checked
{
$petID = $mysidia->input->post("Postname{$index}");
//do whatever
}
}