Fix postLink() & postButton() with nested data.

Flatten deeply nested array data before generating hidden inputs.
This solves 'Array to string conversion' errors.

Closes #2894