Allow scripts to set the value of a script field to primitive arrays

Script fields could not be set to int[] and float[] by native
scripts because StreamInput and StreamOutput could not handle
them.

closes #4175