For the case of an array, wouldn't value implement ARRAY? Need to look at the caller(s) of this as we may want to do something different for arrays. The high-level reason for existence of LiteralExpression is to represent a constant in a query or upsert. So I suppose you're hitting this on the upsert side. If the element type of the array doesn't match the expected type, then we'd likely want to create a new array of the right type. But can that happen?