Adding code for reference types and particularly arrays