Refactor Array, Hash and object assignments.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>