First, to be clear, you *can* use elements of arrays as the 'name=' in forms, as in
<input type="checkbox" name="slotsel[$i]" $slotchk[$i]>
<input type='hidden' name="titles[$topic]" value="$titles[$topic]">
as you seem to be trying. I've been doing it for years; associative arrays also work. The result is that all the inputs of a form can be put into an array, be retrieved in PHP using a single read of $_POST, and be iterated in a loop in PHP; I believe they can also be iterated in a loop in javascript. Contrast this with putting each input value into a separate variable.
$_POST is empty (undefined) the first time a script is run; in this case, that warning is to be exxpected.
In line 9 (), try putting an index between the brackets.