added clear, add, get, set, remove methods; created outofrange method to check if input index within array range