Shape Dependence of Holographic Entanglement Entropy in AdS/BCFT and in Hyperscaling Violating Spacetimes