One way is to do pattern matching over the array. This way I don't have to use any type assertion. Here's the final solution
const result = pipe(
arrayOfObjects,
Array.match({
onEmpty: () => 0,
onNonEmpty: flow(
Array.map(o => o.value),
Array.max(Order.number)
)
})
)
Effect playground link for complete solution - https://effect.website/play#490e0fd8564e