[DDMD] Get array length with detectable pattern

This allows it to automatically be converted to a valid array length expression in D