Add is_assoc helper
Handle both indexed and keyed nested arrays