Avoid temporary array allocations