This ensures that an array is indexed by the appropriate type. Indexing a mouse array with a joystick index is undefined behavior, and with this change, such undefined behavior is now a compilation error.