Add for-loop for library array, but items not getting added