Use designated initializers for array initialization

In addition, make magic number OS_LAST independent of other enum
members. If we add another OS in future, we do not need to change more
than one line of code.