Optimized long array implementation