Add filter_input_array & filter_input_var

First attempt at implementing filter_input_array and filter_input_var.

@shadyvb If you can review and give me your opinion, I would appreciate. 

/cc @fjarrett