Correctly parse dot notations for accessing an array of structs