Support arrays properly in prepatcher, fix multiple generics in field types.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>