Approximate message-passing for convex optimization with non-separable penalties