PHP already has functions like filter_input_array[0] and array_walk_recursive[1] which get you pretty close to having an external data filtering API already, you just have to take a couple of minutes to glue the pieces together. There's nothing wrong with the arrays themselves, if you treat them the way you would treat untrusted data in any language.
[0]http://php.net/manual/en/function.filter-input-array.php
[1]http://php.net/manual/en/function.array-walk-recursive.php