update deserialize to handle both array(primitive) and Array(model)

currently, Array(model) won't be handled properly due to capitalized "Array". this PR aims to update the code for PHP SDKs to handle both array(primitive) and Array(model)