prepare v4 release
fix deficiencies in array_build

Copy values indirectly by index, giving us support for:

- associative arrays
- sparse arrays
- empty strings as elements