Updated script to use safe array access instead of hiding notices

Instead of using the error control operator, the array should be accessed safely to avoid the errors entirely and provide good defaults.