Struct constructor for key-value pairs