What part of town?? There’s a lot of chill restaurant/bars in bed stuy that fit the bill and possibly some in les but ymwv
Thread
Analogue or Ferns are both nice chill cocktail bars where you can definitely find a dark corner and draw all night. Or just go to Washington sq park and sit under the stars
Most libraries close by 6 or 7pm. Some coffee shops are open until 8 or 9pm but will likely require a small purchase. A chill bar wouldn't mind if you sat with your ipad though, not quite a 3rd space. Public park is also an option, depending on where you are.