How do I insert data into an array, from a form?
It depends. For example, you might have a group of form input controls named with name="bar[]", upon which $_POST['bar'] would be an array (assuming method="post").
arrays variables from outside of php (e.g. from forms)