code generation for dynamic array "remove" method