safe array class