Replaces extern var with a safe array