Combine a mapping for O(1) lookup with an array only when you truly need enumeration — and remember arrays cost gas to iterate and can grow past the block gas limit.
struct Position { uint128 amount; uint64 since; bool active; }
mapping(address => Position) public positions;
address[] public stakers;Deleting from the middle of an array is expensive; the swap-and-pop trick moves the last element into the gap when order does not matter.