Fix warning with FormHelper::inputs()

introspectModel() can return non-array data sometimes. Casting avoids
warnings when forms are generate for models with no or faulty schema()
methods.

Refs #3602