Is it permissible to paint the toenails excluding the last small toe? Would wudhu still be valid?

Yes wudu will be valid but make sure your wet hand should be touch on it