[DDMD] [refactor] Move arrayop functions into visitor classes in arrayop.c

And move the supporting member functions into free functions.