ui/cocoa: Use macro ARRAY_SIZE where possible