Add expand array functionality