Swap & pop technique.
items[i] = items[items.length - 1]items.pop()// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Items {
uint256[] public items;
function add(uint256 v) external { items.push(v); }
function removeAt(uint256 i) external {
// TODO swap with last, then pop
}
}