Automatyczne uaktualnianie długości tablicy