Added more advanced array support