Enum cleanup and autoboxing usage

Use of PatchParameterId enum directly as array index for method overload
using the enum as parameter instead of calling int method overload.
Use of the last enum as enum values counter and removed unneeded enum
affectation